/ SeriousOJ /

Record Detail

Wrong Answer


  
# Status Time Cost Memory Cost
#1 Accepted 1ms 540.0 KiB
#2 Wrong Answer 1ms 540.0 KiB
#3 Accepted 1ms 540.0 KiB
#4 Wrong Answer 1ms 540.0 KiB
#5 Wrong Answer 16ms 592.0 KiB
#6 Accepted 16ms 556.0 KiB
#7 Wrong Answer 15ms 556.0 KiB
#8 Wrong Answer 14ms 796.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-05-07 02:33:41
Judged By
Score
30
Total Time
16ms
Peak Memory
796.0 KiB