제출 #554946

#제출 시각아이디문제언어결과실행 시간메모리
554946biggSpeedrun (RMI21_speedrun)C++14
8 / 100
57 ms728 KiB
#include "speedrun.h" #include<bits/stdc++.h> using namespace std; const int MAXN = 1e3 + 10; int freq[1000]; void assignHints(int subtask, int N, int A[], int B[]) { /* your solution here */ setHintLen(20); int pai = 0; for(int i = 1; i < N; i++){ freq[A[i]]++; freq[B[i]]++; if(A[i] > 1){ pai = A[i]; break; } if(B[i] > 1){ pai = B[i]; break; } } for(int i = 1; i <= N; i++){ if(i == pai) continue; for(int j = 0; j < 10; j++){ if((1<<j) & pai) setHint(i, j+1, 1); } } } int l; void speedrun(int subtask, int N, int start) { /* your solution here */ l = getLength(); int pai = 0; for(int i = 1; i <= 10; i++){ if(getHint(i)){ pai |= (1<<(i-1)); } } if(pai == 0){ for(int i = 1; i <= N; i++){ if(i == start) continue; goTo(i); goTo(start); } }else{ goTo(pai); for(int i = 1; i <= N; i++){ if(i == pai) continue; goTo(i); goTo(pai); } } }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...