제출 #1275017

#제출 시각아이디문제언어결과실행 시간메모리
1275017hssaan_arifRoom Temperature (JOI24_ho_t1)C++20
35 / 100
1 ms580 KiB
// #include <me> #include <bits/stdc++.h> using namespace std; #define endl "\n" #define pb push_back #define int long long const int N = 3e5 + 5, M = 1e9 + 7, LG = 20; int n , T , x , y; void solve(){ cin >> n >> T; if (T == 1){ cout << 0 << endl; }else{ int t = -1; for (int i = 1 ; i <= n ; i++){ cin >> x; if (t == -1){ t = x%2; continue; } if(t != x%2){ cout << 1 << endl; return; } } cout << 0 << endl; } } signed main(){ ios::sync_with_stdio(0); cin.tie(0); cout.tie(0); int ts = 1; // cin >> ts; while(ts--){ solve(); } }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...