Submission #845753

#TimeUsernameProblemLanguageResultExecution timeMemory
845753vjudge1Konstrukcija (COCI20_konstrukcija)C++17
110 / 110
1 ms600 KiB
#include <bits/stdc++.h> #define int long long using namespace std; int MX = 64; void solve(void){ int x; cin >> x; x = -x; /* * 7k+2 7k+3 <- 7k+4 * * 7k+5 7k+6 7k+7 <- 7k+8 * * */ cout << 7*MX+23 << " " << 15*MX + 14 - 15<< "\n"; cout << "1 2\n2 3\n2 4\n3 6\n3 7\n3 8\n4 6\n4 7\n4 8\n"; for(int i=1; i<MX; i++){ cout << 7*i-2 +1 << " " << 7*i+2 +1 << "\n"; cout << 7*i-2 +1 << " " << 7*i+3 +1 << "\n"; cout << 7*i-1 +1 << " " << 7*i+2 +1 << "\n"; cout << 7*i-1 +1 << " " << 7*i+3 +1 << "\n"; cout << 7*i+0 +1 << " " << 7*i+2 +1 << "\n"; cout << 7*i+0 +1 << " " << 7*i+3 +1 << "\n"; cout << 7*i+3 +1 << " " << 7*i+5 +1 << "\n"; cout << 7*i+3 +1 << " " << 7*i+6 +1 << "\n"; cout << 7*i+3 +1 << " " << 7*i+7 +1 << "\n"; cout << 7*i+2 +1 << " " << 7*i+5 +1 << "\n"; cout << 7*i+2 +1 << " " << 7*i+6 +1 << "\n"; cout << 7*i+2 +1 << " " << 7*i+7 +1 << "\n"; if(x < 0){ cout << 7*i+4 +1 << " " << 7*i+2 +1 << "\n"; cout << 7*i+4 +1 << " " << 7*i+3 +1 << "\n"; }else{ cout << 7*i+8 +1 << " " << 7*i+5 +1 << "\n"; cout << 7*i+8 +1 << " " << 7*i+6 +1 << "\n"; } } int zero = 7*MX + 20; cout << 7*(MX) + 5 << " " << 7*MX+23 << "\n"; cout << 7*MX-1 << " " << 7*MX+23 << "\n"; cout << 7*MX+0 << " " << 7*MX+23 << "\n"; cout << 7*MX+1 << " " << 7*MX+23 << "\n"; int shift = 2; if(x<0){ shift += 3; x = -x; } for(int i=0; i<MX; i++){ int point = (MX-i)*7+shift; if( (x>>i)%2 == 0 ) point = (MX-i)*7; cout << "1 " << point << "\n"; } } signed main(){ int t=1; // cin >> t; while(t--) solve(); return 0; }

Compilation message (stderr)

konstrukcija.cpp: In function 'void solve()':
konstrukcija.cpp:56:6: warning: unused variable 'zero' [-Wunused-variable]
   56 |  int zero = 7*MX + 20;
      |      ^~~~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...