Submission #228620

# Submission time Handle Problem Language Result Execution time Memory
228620 2020-05-02T07:40:00 Z huangqr Lost in the cycle (IOI19_cycle) C++14
0 / 100
5 ms 256 KB
#include<bits/stdc++.h>
#include "cycle.h"

void escape(int n) {
	int x=ceil(log2(n)),r=0,a=0,to_jump;
	for(int i=x;i>=0;i--){
		int t=(1<<i);
		to_jump=r+t;
		bool yn=jump(to_jump);
		if(yn){
			r=0;
		}
		else{
			r=n-t;
		}
	}
}

Compilation message

cycle.cpp: In function 'void escape(int)':
cycle.cpp:5:26: warning: unused variable 'a' [-Wunused-variable]
  int x=ceil(log2(n)),r=0,a=0,to_jump;
                          ^
# Verdict Execution time Memory Grader output
1 Incorrect 5 ms 256 KB Invalid argument.
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 4 ms 256 KB Invalid argument.
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 5 ms 256 KB Invalid argument.
2 Halted 0 ms 0 KB -