| Task: | Distances |
| Sender: | MRiekasius |
| Submission time: | 2026-04-17 11:29:54 +0300 |
| Language: | C++ (C++20) |
| Status: | COMPILE ERROR |
Compiler report
input/code.cpp: In function 'int main()':
input/code.cpp:8:14: error: expected primary-expression before '{' token
8 | if(nk == {1, 0}) cout << "0 0";
| ^
input/code.cpp:8:13: error: expected ')' before '{' token
8 | if(nk == {1, 0}) cout << "0 0";
| ~ ^~
| )
input/code.cpp:9:14: error: expected primary-expression before '{' token
9 | if(nk == {2, 0}) cout << "0 0 1 1";
| ^
input/code.cpp:9:13: error: expected ')' before '{' token
9 | if(nk == {2, 0}) cout << "0 0 1 1";
| ~ ^~
| )
input/code.cpp:10:14: error: expected primary-expression before '{' token
10 | if(nk == {2, 1}) cout << "0 0 0 1";
| ^
input/code.cpp:10:13: error: expected ')' before '{' token
10 | if(nk == {2, 1}) cout << "0 0 0 1";
| ~ ^~
| )
input/code.cpp:11:14: error: expected primary-expression before '{' token
11...Code
#include <bits/stdc++.h>
using namespace std;
int main()
{
pair<int, int> nk;
cin >> nk.first >> nk.second;
if(nk == {1, 0}) cout << "0 0";
if(nk == {2, 0}) cout << "0 0 1 1";
if(nk == {2, 1}) cout << "0 0 0 1";
if(nk == {3, 0}) cout << "0 0 1 1 2 2";
if(nk == {3, 1}) cout << "0 0 0 1 1000 1000";
if(nk == {3, 2}) cout << "0 0 0 1 1 1";
if(nk == {3, 3}) cout << "0 0 0 1 0 2";
if(nk == {4, 0}) cout << "0 0 1 1 2 2 3 3";
if(nk == {4, 1}) cout << "0 0 0 1 1000 1000 2000 2000";
if(nk == {4, 2}) cout << "0 0 0 1 1 1 1000 1000";
if(nk == {4, 3}) cout << "0 0 1 1 2 2 1000 1000";
if(nk == {4, 4}) cout << "0 0 0 1 2 2 2 1";
if(nk == {4, 5}) cout << "0 0 0 1 0 2 4 1";
if(nk == {4, 6}) cout << "0 0 0 1 0 2 0 3";
}
