| Task: | Polut |
| Sender: | Wiita |
| Submission time: | 2026-01-17 16:52:17 +0200 |
| Language: | C++ (C++17) |
| Status: | READY |
| Result: | 0 |
| group | verdict | score |
|---|---|---|
| #1 | TIME LIMIT EXCEEDED | 0 |
| #2 | OUTPUT LIMIT EXCEEDED | 0 |
| #3 | TIME LIMIT EXCEEDED | 0 |
| #4 | TIME LIMIT EXCEEDED | 0 |
| #5 | TIME LIMIT EXCEEDED | 0 |
| test | verdict | time | group | |
|---|---|---|---|---|
| #1 | TIME LIMIT EXCEEDED | -- | 1, 3, 4, 5 | details |
| #2 | WRONG ANSWER | 0.00 s | 1, 4, 5 | details |
| #3 | TIME LIMIT EXCEEDED | -- | 1, 4, 5 | details |
| #4 | TIME LIMIT EXCEEDED | -- | 1, 4, 5 | details |
| #5 | OUTPUT LIMIT EXCEEDED | 0.00 s | 2, 5 | details |
| #6 | OUTPUT LIMIT EXCEEDED | 0.00 s | 2, 5 | details |
| #7 | TIME LIMIT EXCEEDED | -- | 2, 4, 5 | details |
| #8 | OUTPUT LIMIT EXCEEDED | 0.00 s | 3, 5 | details |
| #9 | WRONG ANSWER | 0.12 s | 3, 5 | details |
| #10 | TIME LIMIT EXCEEDED | -- | 3, 4, 5 | details |
| #11 | TIME LIMIT EXCEEDED | -- | 4, 5 | details |
| #12 | TIME LIMIT EXCEEDED | -- | 4, 5 | details |
| #13 | OUTPUT LIMIT EXCEEDED | 0.00 s | 5 | details |
| #14 | OUTPUT LIMIT EXCEEDED | 0.00 s | 5 | details |
| #15 | WRONG ANSWER | 0.01 s | 4, 5 | details |
| #16 | TIME LIMIT EXCEEDED | -- | 1, 4, 5 | details |
Code
#include <iostream>
#include <bits/stdc++.h>
#include <algorithm>
#include <queue>
#include <vector>
using namespace std;
long long n;
long long m;
long long p;
long long mod = 1000000007;
int main()
{
ios::sync_with_stdio(false);
cin.tie(nullptr);
cin >> n >> m >> p;
vector<vector<pair<long long, long long>>> tree(n + 1);
vector<pair<long long, long long>> emt(m);
for (int i = 0; i < m; i++){
long long from, to;
cin >> from >> to;
tree[from].push_back({from, to});
tree[to].push_back({from, to});
}
long long count = 0;
queue<vector<pair<long long, long long>>> q;
q.push(tree[1]);
while (!q.empty())
{
vector<pair<long long, long long>> p = q.front();
q.pop();
for (auto [from,to] : p)
{
cout << from << " " << to << "\n";
if (to == n)
{
count++;
}
else if (from < to)
{
cout << (from < to);
q.push(tree[to]);
}
}
}
cout << count;
return 0;
}Test details
Test 1 (public)
Group: 1, 3, 4, 5
Verdict: TIME LIMIT EXCEEDED
| input |
|---|
| 4 5 3 1 2 1 3 2 3 2 4 ... |
| correct output |
|---|
| 2 2 10 |
| user output |
|---|
| (empty) |
Test 2
Group: 1, 4, 5
Verdict: WRONG ANSWER
| input |
|---|
| 2 1 1 2 1 |
| correct output |
|---|
| 1 |
| user output |
|---|
| 2 1 0 |
Feedback: Output is longer than expected
Test 3
Group: 1, 4, 5
Verdict: TIME LIMIT EXCEEDED
| input |
|---|
| 10 20 10 6 10 8 1 4 6 9 1 ... |
| correct output |
|---|
| 2 5 34 123 611 2503 11415 4882... |
| user output |
|---|
| (empty) |
Test 4
Group: 1, 4, 5
Verdict: TIME LIMIT EXCEEDED
| input |
|---|
| 10 20 10 4 10 2 3 8 4 7 8 ... |
| correct output |
|---|
| 1 7 26 140 509 2483 9454 43570... |
| user output |
|---|
| (empty) |
Test 5
Group: 2, 5
Verdict: OUTPUT LIMIT EXCEEDED
| input |
|---|
| 100000 200000 2 96303 53915 64836 4748 6389 40954 60420 91374 ... |
| correct output |
|---|
| 1 0 |
| user output |
|---|
| (empty) |
Test 6
Group: 2, 5
Verdict: OUTPUT LIMIT EXCEEDED
| input |
|---|
| 100000 200000 2 72817 17293 93269 856 51497 26888 41679 96276 ... |
| correct output |
|---|
| 5 8 |
| user output |
|---|
| (empty) |
Test 7
Group: 2, 4, 5
Verdict: TIME LIMIT EXCEEDED
| input |
|---|
| 474 517 2 1 2 1 3 2 4 3 4 ... |
| correct output |
|---|
| 0 0 |
| user output |
|---|
| (empty) |
Test 8
Group: 3, 5
Verdict: OUTPUT LIMIT EXCEEDED
| input |
|---|
| 100000 200000 3 59846 53439 11468 57874 83443 13914 46177 15147 ... |
| correct output |
|---|
| 1 0 32 |
| user output |
|---|
| (empty) |
Test 9
Group: 3, 5
Verdict: WRONG ANSWER
| input |
|---|
| 100000 200000 3 23665 7205 83252 56604 14852 7299 2836 9864 ... |
| correct output |
|---|
| 1 0 33 |
| user output |
|---|
| 67100 1 74914 1 0 |
Feedback: Output is longer than expected
Test 10
Group: 3, 4, 5
Verdict: TIME LIMIT EXCEEDED
| input |
|---|
| 474 517 3 1 2 1 3 2 4 3 4 ... |
| correct output |
|---|
| 0 0 986681410 |
| user output |
|---|
| (empty) |
Test 11
Group: 4, 5
Verdict: TIME LIMIT EXCEEDED
| input |
|---|
| 1000 2000 10 691 424 80 318 681 539 33 342 ... |
| correct output |
|---|
| 1 6 39 252 1242 7715 36269 212... |
| user output |
|---|
| (empty) |
Test 12
Group: 4, 5
Verdict: TIME LIMIT EXCEEDED
| input |
|---|
| 1000 2000 10 979 324 770 562 560 7 169 738 ... |
| correct output |
|---|
| 2 2 81 150 2435 6460 66843 223... |
| user output |
|---|
| (empty) |
Test 13
Group: 5
Verdict: OUTPUT LIMIT EXCEEDED
| input |
|---|
| 100000 200000 10 54544 86042 14060 20746 47891 4317 76648 84193 ... |
| correct output |
|---|
| 1 3 54 169 1917 6237 56922 192... |
| user output |
|---|
| (empty) |
Test 14
Group: 5
Verdict: OUTPUT LIMIT EXCEEDED
| input |
|---|
| 100000 200000 10 73275 88704 74521 54506 51906 57193 29561 44568 ... |
| correct output |
|---|
| 6 19 338 1212 12462 49357 3873... |
| user output |
|---|
| (empty) |
Test 15
Group: 4, 5
Verdict: WRONG ANSWER
| input |
|---|
| 1000 1989 10 822 821 979 989 138 139 968 981 ... |
| correct output |
|---|
| 1 44 2935 131120 6357888 28564... |
| user output |
|---|
| 2 1 0 |
Feedback: Output is shorter than expected
Test 16
Group: 1, 4, 5
Verdict: TIME LIMIT EXCEEDED
| input |
|---|
| 3 3 1 1 2 1 3 2 3 |
| correct output |
|---|
| 1 |
| user output |
|---|
| (empty) |
