QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#520640 | #2358. What? Subtasks? Again? | solar_express | WA | 0ms | 3976kb | C++14 | 727b | 2024-08-15 14:29:04 | 2024-08-15 14:29:05 |
Judging History
answer
#include <bits/stdc++.h>
#include <cstdio>
using namespace std;
map<int, set<int>> tasks;
int main() {
cin.tie(0);
ios::sync_with_stdio(false);
for (string line; getline(cin, line); ) {
auto ifs = istringstream(line);
string v;
ifs >> v;
int id;
sscanf(v.c_str(), "CS-%d:", &id);
for (; ifs >> v;) {
int to;
sscanf(v.c_str(), "CS-%d", &to);
tasks[to].insert(id);
}
}
for (auto& [k, S] : tasks) {
cout << "CS-" << k << ":";
for (auto it = begin(S); it != end(S); ++it) {
cout << " CS-" << *it << ",\n"[next(it) == end(S)];
}
}
return 0;
}
详细
Test #1:
score: 0
Wrong Answer
time: 0ms
memory: 3976kb
input:
10 7 10 2 1 3 5 2 1 4 1 9 5 5 4 6 4 7 4 8 4 10 4
output:
CS-3: CS-0 CS-4: CS-0 CS-7: CS-0
result:
wrong answer 1st lines differ - expected: '6', found: 'CS-3: CS-0'