Submission #291861

#TimeUsernameProblemLanguageResultExecution timeMemory
291861penguinhackerKonstrukcija (COCI20_konstrukcija)C++17
0 / 110
1 ms512 KiB
#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 timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...