QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#175534 | #5522. F*** 3-Colorable Graphs | ConfucianDonut | WA | 1ms | 3484kb | C++14 | 701b | 2023-09-10 19:13:31 | 2023-09-10 19:13:31 |
Judging History
answer
#include <iostream>
#include <vector>
using namespace std;
bool vis[10000][10000];
int main() {
int n,m;
cin >> n >> m;
vector <int> graph[n];
int a,b;
for (int i=0; i<m; i++) {
cin >> a >> b;
graph[a-1].push_back(b-n);
}
for (int i=0; i<n; i++) {
for (int j=0; j<graph[i].size(); j++) {
for (int k=0; k<graph[i].size(); k++) {
//cout << j << " " << k << " " << vis[j][k] << endl;
if (vis[j][k]) {
cout << 2 << endl;
return 0;
}
vis[j][k] = true;
}
}
}
cout << 3 << endl;
}
詳細信息
Test #1:
score: 100
Accepted
time: 1ms
memory: 3408kb
input:
2 4 1 3 1 4 2 3 2 4
output:
2
result:
ok 1 number(s): "2"
Test #2:
score: -100
Wrong Answer
time: 1ms
memory: 3484kb
input:
3 5 1 4 2 4 2 5 3 5 3 6
output:
2
result:
wrong answer 1st numbers differ - expected: '3', found: '2'