/ SeriousOJ /

Record Detail

Time Exceeded


  
# Status Time Cost Memory Cost
#1 Accepted 1ms 548.0 KiB
#2 Accepted 26ms 756.0 KiB
#3 Time Exceeded ≥1098ms ≥536.0 KiB
#4 Time Exceeded ≥1096ms ≥532.0 KiB

Code

                            /*in the name of almighty ALLAH*/

#include<bits/stdc++.h>
#include<ext/pb_ds/assoc_container.hpp>
#include<ext/pb_ds/tree_policy.hpp>
using namespace __gnu_pbds;
using namespace std;

#define int long long
#define endl '\n'
#define all(a) (a).begin(),(a).end()
#define rall(a) (a).rbegin(),(a).rend()
#define MOD 1000000007
#define MOD2 987654319
#define fast ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
#define yes cout << "YES" << endl
#define no cout << "NO" << endl
#define sz(x) (int)x.size()

template <typename T> using pbds = tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>;
template <typename T> using multi_pbds = tree<T, null_type, less_equal<T>, rb_tree_tag, tree_order_statistics_node_update>;

//***********************************START*******************************************//

void solve()
{
    int n; cin >> n;
    int p = 2, i = 3;
    while(p < n){
        p += i;
        i++;
    }
    if(p == n) cout << "b\n";
    else cout << "a\n";

}

//***********************************END*********************************************//
int32_t main(){ fast

    int32_t t = 1, i;
      cin >> t;
    for(i = 1; i <= t; i++)
    {
       // cout << "Case " << i << ": ";
        solve();
    }
}

Information

Submit By
Type
Submission
Problem
P1223 C. Infinity Sequence
Contest
Happy New Year 2026
Language
C++17 (G++ 13.2.0)
Submit At
2026-01-06 15:10:15
Judged At
2026-01-06 15:10:15
Judged By
Score
20
Total Time
≥1098ms
Peak Memory
≥756.0 KiB