/ SeriousOJ /

Record Detail

Wrong Answer


  
# Status Time Cost Memory Cost
#1 Accepted 349ms 61.699 MiB
#2 Accepted 363ms 61.891 MiB
#3 Wrong Answer 409ms 61.73 MiB
#4 Wrong Answer 383ms 61.891 MiB

Code

#include "bits/stdc++.h"
//#include <bits/stdc++.h>
using namespace std;

#define int long long
#define endl '\n'
#define all(x) (x).begin(), (x).end()
#define rall(x) (x).rbegin(), (x).rend()
#define fr(i,a,b) for(int i = a; i < b; i++)
#define in(v,n)  vi v(n); fr(i,0,n) cin>>v[i];
#define yes cout<<"YES"<<'\n'
#define no cout<<"NO"<<'\n'
#define fastio ios_base::sync_with_stdio(false); cin.tie(NULL);

typedef vector<int> vi;

map<int, int> m;

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

    if (m.find(k) != m.end())
    {
    	cout << 'b' << endl;
    }
    else
    {
    	cout << 'a' << endl;
    }

   

}

int32_t main() 
{
    fastio;

    m[2]++;

    int x = 3;
    int prev = 2;

    fr(i,0,1000000)
    {
    	m[prev+x]++;
    	prev += x;
    	x++;
    }


    int t; cin >> t;
    while(t--) solve();

    return 0;
}

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:57:40
Judged At
2026-01-06 15:57:40
Judged By
Score
20
Total Time
409ms
Peak Memory
61.891 MiB