QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#483003#4829. Mark on a GraphBucketsmith0 1ms3864kbC++20504b2024-07-18 09:25:372024-07-18 09:25:37

Judging History

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

  • [2024-07-18 09:25:37]
  • 评测
  • 测评结果:0
  • 用时:1ms
  • 内存:3864kb
  • [2024-07-18 09:25:37]
  • 提交

answer

#include <bits/stdc++.h>
using namespace std;

int main() {
    int n, m;
    cin >> n >> m;
    vector<int> a(5, 1);
    for(int i = 1, u, v; i <= m; i ++) {
        cin >> u >> v;
        if(u > v) swap(u, v);
        if(u == 1 && v <= 6) a[v - 2] = 0;
    }

    int x = accumulate(a.begin(), a.end(), 0);
    if(x == 0) cout << "ok\n";
    else{
        cout << "mark\n" << x << "\n";
        for(int i = 0; i < 5; i ++)
            if(a[i]) cout << "1 " << i + 2 << "\n";
    }
}

詳細信息

Test #1:

score: 0
Wrong Answer
time: 1ms
memory: 3864kb

input:

1000 3560
603 151
415 20
102 569
895 552
678 734
24 614
689 518
440 223
751 919
223 433
711 551
502 634
706 583
812 501
514 535
780 751
720 530
532 384
888 139
864 791
292 675
171 881
30 592
464 557
280 299
654 650
894 335
250 532
792 10
83 969
118 771
579 300
852 983
243 940
957 939
817 889
911 319...

output:

mark
5
1 2
1 3
1 4
1 5
1 6

input:

1000 3565
721 353
606 33
429 542
522 656
682 141
194 833
746 181
165 850
263 583
392 102
221 187
643 633
788 161
180 790
481 180
640 763
583 378
224 873
974 302
521 639
368 691
720 39
113 433
679 583
16 526
882 125
351 806
509 955
464 840
322 379
161 916
232 79
178 201
182 394
201 34
883 528
916 901...

output:

mark
5
1 2
1 3
1 4
1 5
1 6

result:

wrong answer Token "mark" doesn't correspond to pattern "ok"