# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
117240 | 2019-06-15T11:53:50 Z | JohnTitor | Highway design (CEOI12_highway) | C++11 | 4 ms | 1280 KB |
#include <bits/stdc++.h> using namespace std; #define FOR(i, j, k) for(int i=(j); i<=(k); i++) #define FFOR(i, j, k) for(int i=(j); i<(k); i++) #define DFOR(i, j, k) for(int i=(j); i>=(k); i--) #define bug(x) cerr<<#x<<" = "<<(x)<<'\n' #define pb push_back #define mp make_pair #define bit(s, i) (((s)>>(i))&1LL) #define mask(i) ((1LL<<(i))) #define builtin_popcount __builtin_popcountll #define __builtin_popcount __builtin_popcountll using ll=long long; using ld=long double; mt19937_64 rng(chrono::high_resolution_clock::now().time_since_epoch().count()); const ld pi=acos(0)*2; template <typename T> inline void read(T &x){char c; bool nega=0; while((!isdigit(c=getchar()))&&(c!='-')); if(c=='-'){nega=1; c=getchar();} x=c-48; while(isdigit(c=getchar())) x=x*10+c-48; if(nega) x=-x;} template <typename T> inline void writep(T x){if(x>9) writep(x/10); putchar(x%10+48);} template <typename T> inline void write(T x){if(x<0){ putchar('-'); x=-x;} writep(x);} template <typename T> inline void writeln(T x){write(x); putchar('\n');} #define taskname "Highway" #ifdef Aria void Answer(int a, int b, int c, int d){} bool isOnLine(int a, int b, int c){} int GetN(){}; #else #include "office.h" #endif // Aria int n; int a=1; int x, y, z, t, f; void answer(int a, int b, int c, int d){ Answer(a, b, c, d); assert(a); assert(b); assert(c); assert(d); exit(0); } int main(){ // #ifdef Aria // if(fopen(taskname".in", "r")) // freopen(taskname".in", "r", stdin); // #endif // Aria //assert(0); n=GetN(); int wah=0; for(int b=2, c=3; true; b+=2, c+=2){ if(isOnLine(a, b, c)){ x=b; continue; } else{ int d=c+1; f=d; if(isOnLine(a, b, d)){ x=a; y=b; z=c; wah=1; } else if(isOnLine(a, c, d)){ x=a; y=c; z=b; wah=2; } else{ // if(x){ // answer(a, x, b, c); // // } // else{ t=x; x=b; y=c; z=a; wah=3; // } } break; } } if(wah!=3) while(true){ assert(1); } for(int p=f, q=f+1; true; p+=2, q+=2){ assert(q<=n); if(isOnLine(x, p, q)) continue; else{ if(isOnLine(x, y, p)) t=q; else t=p; break; } } if(t==0) t=n; answer(x, y, z, t); }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Runtime error | 2 ms | 512 KB | Execution killed with signal 11 (could be triggered by violating memory limits) |
2 | Runtime error | 3 ms | 512 KB | Execution killed with signal 11 (could be triggered by violating memory limits) |
3 | Runtime error | 3 ms | 512 KB | Execution killed with signal 11 (could be triggered by violating memory limits) |
4 | Runtime error | 2 ms | 512 KB | Execution killed with signal 11 (could be triggered by violating memory limits) |
5 | Runtime error | 2 ms | 512 KB | Execution killed with signal 11 (could be triggered by violating memory limits) |
6 | Runtime error | 2 ms | 512 KB | Execution killed with signal 11 (could be triggered by violating memory limits) |
7 | Runtime error | 2 ms | 512 KB | Execution killed with signal 11 (could be triggered by violating memory limits) |
8 | Runtime error | 2 ms | 512 KB | Execution killed with signal 11 (could be triggered by violating memory limits) |
9 | Runtime error | 2 ms | 512 KB | Execution killed with signal 11 (could be triggered by violating memory limits) |
10 | Runtime error | 2 ms | 512 KB | Execution killed with signal 11 (could be triggered by violating memory limits) |
11 | Runtime error | 2 ms | 512 KB | Execution killed with signal 11 (could be triggered by violating memory limits) |
12 | Runtime error | 3 ms | 512 KB | Execution killed with signal 11 (could be triggered by violating memory limits) |
13 | Runtime error | 2 ms | 640 KB | Execution killed with signal 11 (could be triggered by violating memory limits) |
14 | Runtime error | 3 ms | 512 KB | Execution killed with signal 11 (could be triggered by violating memory limits) |
15 | Runtime error | 3 ms | 640 KB | Execution killed with signal 11 (could be triggered by violating memory limits) |
16 | Runtime error | 3 ms | 512 KB | Execution killed with signal 11 (could be triggered by violating memory limits) |
17 | Runtime error | 3 ms | 512 KB | Execution killed with signal 11 (could be triggered by violating memory limits) |
18 | Runtime error | 2 ms | 512 KB | Execution killed with signal 11 (could be triggered by violating memory limits) |
19 | Runtime error | 3 ms | 768 KB | Execution killed with signal 11 (could be triggered by violating memory limits) |
20 | Runtime error | 3 ms | 768 KB | Execution killed with signal 11 (could be triggered by violating memory limits) |
21 | Runtime error | 3 ms | 896 KB | Execution killed with signal 11 (could be triggered by violating memory limits) |
22 | Runtime error | 3 ms | 1024 KB | Execution killed with signal 11 (could be triggered by violating memory limits) |
23 | Runtime error | 3 ms | 1024 KB | Execution killed with signal 11 (could be triggered by violating memory limits) |
24 | Runtime error | 3 ms | 1152 KB | Execution killed with signal 11 (could be triggered by violating memory limits) |
25 | Runtime error | 4 ms | 1280 KB | Execution killed with signal 11 (could be triggered by violating memory limits) |