| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 138279 | wzy | 자리 배치 (IOI18_seats) | C++11 | 1993 ms | 33016 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "seats.h"
#include <bits/stdc++.h>
using namespace std;
const int N = 10005;
std::vector<int> r;
int posX[N] ,posY[N];
int H , W;
void give_initial_chart(int Hw, int Ww, std::vector<int> R, std::vector<int> C) {
H = Hw, W = Ww;
for(int i = 0 ; i < R.size() ; i ++){
posX[i] = R[i];
posY[i] = C[i];
}
}
int swap_seats(int a, int b) {
swap(posX[a] , posX[b]);
swap(posY[a] , posY[b]);
int minvlX = 1000000000 , maxvlX = -1;
int minvlY = 1000000000 , maxvlY = -1;
int cnt = 0;
for(int i = 0 ; i < H*W ; i++){
minvlX = min(minvlX , posX[i]) , maxvlX = max(maxvlX , posX[i]);
minvlY = min(minvlY , posY[i]) , maxvlY = max(maxvlY , posY[i]);
if((abs(minvlX - maxvlX ) + 1 ) * (abs(minvlY - maxvlY) + 1) == i + 1){
cnt++;
}
}
return cnt;
}
컴파일 시 표준 에러 (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... | ||||
