# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
773274 | Sami_Massah | Coin Collecting (JOI19_ho_t4) | C++17 | 72 ms | 15380 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
using namespace std;
const long long maxn = 2e5 + 12, mod = 1e9 + 7;
long long n, a[3][maxn], x[maxn], y[maxn];
set <int> Q[3];
int main(){
ios_base::sync_with_stdio(false), cin.tie(0);
cin >> n;
for(int i = 0; i < 2 * n; i++)
cin >> x[i] >> y[i];
long long d = 0;
for(int i = 0; i < 2 * n; i++){
if(y[i] < 1 || 2 < y[i]){
if(y[i] < 1){
d += 1 - y[i];
y[i] = 1;
}
else{
d += y[i] - 2;
y[i] = 2;
}
}
if(x[i] < 1 || n < x[i]){
if(x[i] < 1){
d += 1 - x[i];
x[i] = 1;
}
else{
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |