제출 #627143

#제출 시각아이디문제언어결과실행 시간메모리
627143haojiandanPrisoner Challenge (IOI22_prison)C++17
56 / 100
13 ms1236 KiB
#include "prison.h"
#include <bits/stdc++.h>
using namespace std;
int Get(int x) {
	if (x==0) return -1; return -2;
}
vector<vector<int>> devise_strategy(int n) {
	vector<vector<int> > res(27,vector<int>(n+1));
	res[0][0]=0;
	for (int i=1;i<=n;i++) res[0][i]=((i>>12&1)?2:1);
	for (int i=1;i<=26;i++) {
		int bit=12-(i+1)/2+1;
		res[i][0]=(i%4==0||i%4==3?0:1);
		int lst=(i%2==0?1:0);
		int nxt=(i%2==0?i+1:i+2);
		for (int j=1;j<=n;j++) {
			int now=(j>>bit&1);
			if (now!=lst) {
				if (now<lst) res[i][j]=Get(res[i][0]);
				else res[i][j]=Get(res[i][0]^1);
			} else {
				res[i][j]=((j>>(bit-1)&1)?nxt+1:nxt);
				res[i][j]=min(res[i][j],26);
			}
		}
	}
	/*for (int i=0;i<=26;i++) {
		for (int j=1;j<=n;j++) printf("%d ",res[i][j]); puts("");
	}*/
	return res;
}

컴파일 시 표준 에러 (stderr) 메시지

prison.cpp: In function 'int Get(int)':
prison.cpp:5:2: warning: this 'if' clause does not guard... [-Wmisleading-indentation]
    5 |  if (x==0) return -1; return -2;
      |  ^~
prison.cpp:5:23: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'if'
    5 |  if (x==0) return -1; return -2;
      |                       ^~~~~~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...