Submission #845593

# Submission time Handle Problem Language Result Execution time Memory
845593 2023-09-06T14:22:08 Z vjudge1 Konstrukcija (COCI20_konstrukcija) C++17
15 / 110
1 ms 348 KB
#include <bits/stdc++.h>
using namespace std;
 
#define fast ios::sync_with_stdio(0);cin.tie(0);
#define s second
#define f first
typedef long long ll;
const ll MOD = 998244353;
const ll LOGN = 20;
const ll MAXN = 3e5 + 5;

int main() {
	fast
	int K;
	cin >> K;
	if (K >= 0) {
		int N = abs(K)+4;

		cout << N << " " << (N-3)*2 << "\n";
		for (int i = 2; i <= N-2; i++) {
			cout << "1 " << i << "\n";
			cout << i << " " << N << "\n";
		}
	} else {
		int N = 4 + abs(K);
		int M = 4 + 2*abs(K);
		cout << N << " " << M << "\n";
		cout << "1 2\n1 3\n2 3\n3 " << N << "\n";
		for (int i = 4; i <= N-1; i++) {
			cout << 1 << " " << i << "\n";
			cout << i << " " << N << "\n"; 
		}
	}
}
# Verdict Execution time Memory Grader output
1 Correct 1 ms 344 KB Correct.
2 Correct 0 ms 348 KB Correct.
3 Correct 1 ms 348 KB Correct.
4 Correct 0 ms 348 KB Correct.
5 Correct 0 ms 348 KB Correct.
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 348 KB Wrong answer.
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 1 ms 344 KB Correct.
2 Correct 0 ms 348 KB Correct.
3 Correct 1 ms 348 KB Correct.
4 Correct 0 ms 348 KB Correct.
5 Correct 0 ms 348 KB Correct.
6 Incorrect 1 ms 348 KB Wrong answer.
7 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 1 ms 344 KB Correct.
2 Correct 0 ms 348 KB Correct.
3 Correct 1 ms 348 KB Correct.
4 Correct 0 ms 348 KB Correct.
5 Correct 0 ms 348 KB Correct.
6 Incorrect 1 ms 348 KB Wrong answer.
7 Halted 0 ms 0 KB -