| Task: | Data Packet Routing |
| Sender: | El Numero Uno |
| Submission time: | 2018-05-26 11:50:31 +0300 |
| Language: | C++ |
| Status: | READY |
| Result: | WRONG ANSWER |
| test | verdict | time | |
|---|---|---|---|
| #1 | ACCEPTED | 0.02 s | details |
| #2 | WRONG ANSWER | 0.45 s | details |
| #3 | WRONG ANSWER | 0.44 s | details |
| #4 | WRONG ANSWER | 0.42 s | details |
| #5 | WRONG ANSWER | 0.09 s | details |
| #6 | WRONG ANSWER | 0.02 s | details |
| #7 | WRONG ANSWER | 0.02 s | details |
| #8 | WRONG ANSWER | 0.01 s | details |
| #9 | WRONG ANSWER | 0.01 s | details |
Code
#include <iostream>
#include "stdio.h"
using namespace std;
int main()
{
int N;
cin >> N;
for (int i = 0; i < N; i++) {
int c, v, from, to;
cin >> c >> v;
int Cfrom[c], Cto[c];
for (int j = 0; j < c; j++) {
Cfrom[j] = 0;
Cto[j] = 0;
}
for (int j = 0; j < v; j++) {
cin >> from >> to;
Cfrom[from]++;
Cto[to]++;
}
int m = 0;
for (int j = 0; j < c; j++) {
if (Cfrom[j] > m) m = Cfrom[j];
if (Cto[j] > m) m = Cto[j];
}
printf("%i\n", m);
}
return 0;
}
Test details
Test 1
Verdict: ACCEPTED
| input |
|---|
| 2 10 3 1 2 2 1 3 4 ... |
| correct output |
|---|
| 1 2 |
| user output |
|---|
| 1 2 |
Test 2
Verdict: WRONG ANSWER
| input |
|---|
| 10 400 100000 292 392 33 131 61 254 ... |
| correct output |
|---|
| 2 2 2 2 2 ... |
| user output |
|---|
| 314 296 308 301 301 ... |
Test 3
Verdict: WRONG ANSWER
| input |
|---|
| 10 700 100000 603 318 570 280 374 589 ... |
| correct output |
|---|
| 2 2 2 2 2 ... |
| user output |
|---|
| 192 181 180 182 186 ... |
Test 4
Verdict: WRONG ANSWER
| input |
|---|
| 10 1000 100000 612 150 630 797 925 44 ... |
| correct output |
|---|
| 2 2 2 2 2 ... |
| user output |
|---|
| 132 132 138 136 132 ... |
Test 5
Verdict: WRONG ANSWER
| input |
|---|
| 10 1000 10000 25 713 450 653 659 325 ... |
| correct output |
|---|
| 2 2 2 2 2 ... |
| user output |
|---|
| 25 22 24 23 23 ... |
Test 6
Verdict: WRONG ANSWER
| input |
|---|
| 10 1000 3000 804 754 634 483 331 476 ... |
| correct output |
|---|
| 2 2 2 2 2 ... |
| user output |
|---|
| 11 9 11 11 9 ... |
Test 7
Verdict: WRONG ANSWER
| input |
|---|
| 10 1000 1000 529 538 501 784 783 645 ... |
| correct output |
|---|
| 2 2 2 2 2 ... |
| user output |
|---|
| 6 6 6 6 7 ... |
Test 8
Verdict: WRONG ANSWER
| input |
|---|
| 10 1000 300 602 710 622 952 254 471 ... |
| correct output |
|---|
| 1 2 2 1 1 ... |
| user output |
|---|
| 4 3 3 3 3 ... |
Test 9
Verdict: WRONG ANSWER
| input |
|---|
| 10 1000 100 295 836 509 67 436 838 ... |
| correct output |
|---|
| 1 1 1 1 1 ... |
| user output |
|---|
| 3 3 2 2 3 ... |
