/ SeriousOJ /

Record Detail

Wrong Answer


  
# Status Time Cost Memory Cost
#1 Accepted 2ms 320.0 KiB
#2 Wrong Answer 2ms 480.0 KiB
#3 Accepted 2ms 320.0 KiB
#4 Wrong Answer 2ms 344.0 KiB

Code

#include<bits/stdc++.h>
#include <ext/pb_ds/tree_policy.hpp>
#include <ext/pb_ds/assoc_container.hpp>
using namespace std;
using namespace __gnu_pbds;
#define ll long long
#define pb push_back
#define mp make_pair
#define yes cout<< "YES"<< '\n'
#define no cout<< "NO"<< '\n'
#define all(x) (x).begin(), (x).end()
#define rall(x) (x).rbegin(), (x).rend()
#define srt(v) sort(all(v))
#define rsrt(v) sort(rall(v))
#define gcd(a,b) __gcd(a, b)
#define lcm(a,b) ((a) * (b)) / gcd(a, b)
#define out cout<< '\n'
#define endl '\n'
#define debug(x) cout<< #x<< "  "<< x<< endl
typedef tree<int, null_type, less<int>, rb_tree_tag, tree_order_statistics_node_update> indexed_set;

void solve()
{
    int n;
    cin>> n;

    if (n&1)
        cout << "1\n"; 
    else
        cout << (n >> 1) << endl;




}
    
int main(){
    // #ifndef ONLINE_JUDGE
    // freopen("input.txt", "r", stdin);
    // freopen("output.txt", "w", stdout);
    // #endif
    
    int t;
    cin >> t;
    while (t--) {
        solve();
    }

    return 0;
}

Information

Submit By
Type
Submission
Problem
P1052 Yet Another Array Partition
Language
C++17 (G++ 13.2.0)
Submit At
2024-05-07 02:33:41
Judged At
2024-11-11 03:31:12
Judged By
Score
10
Total Time
2ms
Peak Memory
480.0 KiB