답안 #881258

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
881258 2023-12-01T02:10:54 Z smartmonky 비밀 (JOI14_secret) C++14
0 / 100
20000 ms 4508 KB
#include "secret.h"
#include <bits/stdc++.h>
 
#define ff first
#define ss second
#define pb push_back
#define all(x) x.begin(),x.end()
#define rall(x) x.rbegin(),x.rend()
 
using namespace std;
 
int b[10005];

int Query(int l, int r){
	
	vector <int> prev, cur;
	for(int i = l ; i <= r; i++)
		cur.pb(b[i]);
		
	int cnt = 0;
	while((int)cur.size() > 1){
		for(int i = 0; i + 1 < r; i += 2){
			prev.pb(Secret(cur[i], cur[i + 1]));
		}
		cnt++;
		cur = prev;
		prev.clear();
		if(cnt > 1e5)return EXIT_FAILURE;
	}
	
	return cur[0];
}
 
void Init(int n, int a[])
{
	for(int i=0;i<n;i++)b[i]=a[i];
}
# 결과 실행 시간 메모리 Grader output
1 Incorrect 2466 ms 2804 KB Wrong Answer: Query(222, 254) - expected : 34031541, actual : 1.
2 Incorrect 8850 ms 2812 KB Wrong Answer: Query(60, 375) - expected : 669221184, actual : 1.
3 Incorrect 6014 ms 2812 KB Wrong Answer: Query(211, 401) - expected : 674373968, actual : 1.
4 Incorrect 12135 ms 4508 KB Wrong Answer: Query(90, 497) - expected : 397934825, actual : 1.
5 Incorrect 19508 ms 4508 KB Wrong Answer: Query(587, 915) - expected : 752404486, actual : 1.
6 Incorrect 7012 ms 4504 KB Wrong Answer: Query(738, 741) - expected : 983692994, actual : 1.
7 Execution timed out 20098 ms 4436 KB Time limit exceeded
8 Execution timed out 20042 ms 4440 KB Time limit exceeded
9 Execution timed out 20044 ms 4392 KB Time limit exceeded
10 Execution timed out 20045 ms 4244 KB Time limit exceeded