Submission #291861

# Submission time Handle Problem Language Result Execution time Memory
291861 2020-09-05T22:11:07 Z penguinhacker Konstrukcija (COCI20_konstrukcija) C++17
0 / 110
1 ms 512 KB
#include <bits/stdc++.h>
using namespace std;

#define ll long long
#define ar array

void print(int i, int j) {
	cout << i << " " << j << "\n";
}

int main() {
	ios::sync_with_stdio(0);
	cin.tie(0);

	ll k; cin >> k;
	if (abs(k)>500) assert(0);
	if (k>=0) {
		cout << k+3 << "\n";
		for (int i=2; i<=k+2; ++i) {
			print(1, i);
			print(i, k+3);
		}
	}
	else {
		k=-k;
		cout << k+5 << "\n";
		for (int i=2; i<=k+2; ++i) {
			print(1, i);
			print(i, k+3);
			print(i, k+4);
		}
		print(k+3, k+5);
		print(k+4, k+5);
	}
	return 0;
}
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 512 KB Wrong output format.
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 512 KB Wrong output format.
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 512 KB Wrong output format.
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 512 KB Wrong output format.
2 Halted 0 ms 0 KB -