| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 1052488 | Ahmed57 | 자리 배치 (IOI18_seats) | C++17 | 4062 ms | 41136 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "bits/stdc++.h"
using namespace std;
vector<int> r,c;
int h,w;
void give_initial_chart(int H, int W, vector<int> R, vector<int> C){
h = H;
w = W;
for(int i = 0;i<H*W;i++){
r.push_back(R[i]);
c.push_back(C[i]);
}
}
int swap_seats(int a, int b){
swap(r[a],r[b]);
swap(c[a],c[b]);
int mnx = 1e9 , mxx = -1e9 , mny = 1e9 , mxy = -1e9;
int ans = 0;
for(int i = 0;i<h*w;i++){
mnx = min(mnx,r[i]);
mxx = max(mxx,r[i]);
mny = min(mny,c[i]);
mxy = max(mxy,c[i]);
if(i+1==(mxx-mnx+1)*(mxy-mny+1)){
ans++;
}
}
return ans;
}| # | 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... | ||||
