Submission #845593

#TimeUsernameProblemLanguageResultExecution timeMemory
845593vjudge1Konstrukcija (COCI20_konstrukcija)C++17
15 / 110
1 ms348 KiB
#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 timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...