QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#175534#5522. F*** 3-Colorable GraphsConfucianDonutWA 1ms3484kbC++14701b2023-09-10 19:13:312023-09-10 19:13:31

Judging History

你现在查看的是最新测评结果

  • [2023-09-10 19:13:31]
  • 评测
  • 测评结果:WA
  • 用时:1ms
  • 内存:3484kb
  • [2023-09-10 19:13:31]
  • 提交

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'