| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 1366054 | avahw | A String Problem (EGOI25_stringproblem) | C++20 | 0 ms | 348 KiB |
#include <bits/stdc++.h>
using namespace std;
int main(){
cin.tie(0);
ios::sync_with_stdio(0);
int n;
cin >> n;
vector<pair<int, int>> strings(n);
for(int i = 0; i < n; i++){
cin >> strings[i].first >> strings[i].second;
}
vector<int> dists;
int good = true;
for(auto p : strings){
int s = p.first;
int e = p.second;
int circle_dist = min(abs(s - e), (2 * n) - abs(s - e));
if(circle_dist % 2 == 0) good = false;
}
if(good) cout << 0 << "\n";
else cout << 2 << "\n";
}| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
