답안 #879242

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
879242 2023-11-27T03:06:22 Z vjudge1 Logičari (COCI21_logicari) C++17
10 / 110
0 ms 348 KB
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const int N = 1e5 + 10, MOD = 998244353;

// bool is[N];
// bool check(int n){
//     for(int i = 0;i < (1 << n);i++){
//         for(int j = 0;j < n;j++){
//             if((i >> j) & 1){
//                 is[j + 1] = 0;
//             }else{
//                 is[j + 1] = 1;
//             }
//         }
//         bool ok = true;
//         for(int j = 1;j <= n;j++){
//             int x;
//             if(j==1) x= (is[n] + is[2]);
//             else if(j == n) x = (is[1] + is[n - 1]);
//             else x = is[j - 1] + is[j + 1];
//             if(x != 1) ok = 0;
//             if(!ok) break;
//         }
//         if(ok){
//             for(int j = 0;j < n;j++)
//             {
//                 // if((i >> j) & 1) cout << 0;
//                 // else cout <<1;
//             }
//             // cout << '\n';
//             return 1;
//         }
//     }
//     return 0;
// }
int n;
void test(){
    cin >> n;
    if(n % 4){
        cout << -1;
        return;
    }
    cout << n / 2;
}
int main()
{
    ios_base::sync_with_stdio(0);
    cin.tie(0);
    int T = 1;
    // cin >> T;
    for(int i = 1;i <= T;i++)
    {
        test();
    }
}
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 348 KB Output is correct
2 Correct 0 ms 348 KB Output is correct
3 Correct 0 ms 344 KB Output is correct
4 Correct 0 ms 348 KB Output is correct
5 Correct 0 ms 348 KB Output is correct
6 Correct 0 ms 344 KB Output is correct
7 Correct 0 ms 348 KB Output is correct
8 Correct 0 ms 344 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Incorrect 0 ms 348 KB Output isn't correct
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 0 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 0 ms 344 KB Output is correct
4 Correct 0 ms 348 KB Output is correct
5 Correct 0 ms 348 KB Output is correct
6 Correct 0 ms 344 KB Output is correct
7 Correct 0 ms 348 KB Output is correct
8 Correct 0 ms 344 KB Output is correct
9 Incorrect 0 ms 348 KB Output isn't correct
10 Halted 0 ms 0 KB -