# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
1089951 | 2024-09-17T12:25:34 Z | solitaryMan | Room Temperature (JOI24_ho_t1) | C++17 | 2 ms | 444 KB |
#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; for(int i = 0; i < n; i++){ cin >> v[i]; v[i] %= 2; flg |= v[i]; } cout << (*max_element(begin(v),end(v)) == 0 && flg ? 1 : 0 )<< endl; // 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; }
Compilation message
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Incorrect | 1 ms | 348 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 0 ms | 348 KB | Output is correct |
2 | Correct | 0 ms | 348 KB | Output is correct |
3 | Correct | 1 ms | 344 KB | Output is correct |
4 | Correct | 0 ms | 344 KB | Output is correct |
5 | Correct | 0 ms | 348 KB | Output is correct |
6 | Correct | 1 ms | 348 KB | Output is correct |
7 | Correct | 1 ms | 444 KB | Output is correct |
8 | Correct | 0 ms | 348 KB | Output is correct |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 0 ms | 348 KB | Output is correct |
2 | Correct | 0 ms | 348 KB | Output is correct |
3 | Correct | 1 ms | 344 KB | Output is correct |
4 | Correct | 0 ms | 344 KB | Output is correct |
5 | Correct | 0 ms | 348 KB | Output is correct |
6 | Correct | 1 ms | 348 KB | Output is correct |
7 | Correct | 1 ms | 444 KB | Output is correct |
8 | Correct | 0 ms | 348 KB | Output is correct |
9 | Correct | 1 ms | 348 KB | Output is correct |
10 | Incorrect | 2 ms | 348 KB | Output isn't correct |
11 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 0 ms | 348 KB | Output is correct |
2 | Correct | 0 ms | 348 KB | Output is correct |
3 | Correct | 1 ms | 344 KB | Output is correct |
4 | Correct | 0 ms | 344 KB | Output is correct |
5 | Correct | 0 ms | 348 KB | Output is correct |
6 | Correct | 1 ms | 348 KB | Output is correct |
7 | Correct | 1 ms | 444 KB | Output is correct |
8 | Correct | 0 ms | 348 KB | Output is correct |
9 | Correct | 1 ms | 348 KB | Output is correct |
10 | Incorrect | 2 ms | 348 KB | Output isn't correct |
11 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Incorrect | 1 ms | 348 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |