# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
1089956 | solitaryMan | Room Temperature (JOI24_ho_t1) | C++17 | 1 ms | 436 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
using namespace std;
#define endl "\n"
#define ll long long
#define line cout << "---------------------------" << endl;
#define M -1
#define debug(x) cout << "x " << x << endl;
#define all(a) a.begin(), a.end()
#define INF (int) 1e9
bool sq(int n){
return n * n;
}
void solve(){
int n,t; cin >> n >> t;
if(t == 1){
cout << 0 << endl;
return;
}
vector<int> v(n);
bool flg = 0;
int cnt = 0;
for(int i = 0; i < n; i++){
cin >> v[i];
cnt += v[i] % 2 ;
}
cout << (cnt == n or cnt == 0 ? 0 : 1);
// 2
// 1 2 3 4 5
// 1 2 1 2 1
// 1 0 1 0 1
}
int32_t main(){
int t = 1;
//cin >> t;
while(t--){solve();}
cerr << "Execution time: " << 1000.f * clock() / CLOCKS_PER_SEC << " ms." << endl;
}
컴파일 시 표준 에러 (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... |