| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 199844 | zoooma13 | Sajam (COCI18_sajam) | C++14 | 209 ms | 632 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
using namespace std;
#define MAX_N 1003
int n ,k;
bitset <MAX_N> bs[MAX_N];
int lk(int g=n){
int ret = INT_MAX;
for(int i=0; i<g; i++){
int toch = 0;
for(int j=0; j<n; j++){
int diff = (bs[i]^bs[j]).count();
toch += min(diff, n-diff);
}
ret = min(ret ,toch);
}
return ret;
}
int main()
{
scanf("%d%d",&n,&k);
for(int i=0; i<n; i++)
for(int j=0; j<n; j++){
char c;
scanf(" %c",&c);
bs[i][j] = (c == 'o');
}
int mik = lk();
if(k == n){
for(int i=0; i<n; i++){
bs[0][i] = bs[0][i]^1;
mik = min(mik ,lk(1));
bs[0][i] = bs[0][i]^1;
}
}
printf(mik <= k ? "DA\n" : "NE\n");
}
컴파일 시 표준 에러 (stderr) 메시지
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
