답안 #498050

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
498050 2021-12-24T10:09:26 Z ergagan Nice sequence (IZhO18_sequence) C++17
100 / 100
1497 ms 94420 KB
//я так много думал, что опять попал
#include <bits/stdc++.h>
#define all(x) x.begin(),x.end()
#define pb push_back
#define ppb pop_back
#define pf push_front
#define ppf pop_front
#define f first
#define s second
#define left(v) v + v
#define right(v) v + v + 1
#define ub upper_bound
#define lb lower_bound
#define pll pair<ll, ll>
#define gay natural

//17 SEVENTEEN
//#pragma comment(linker, "/stack:200000000")
//#pragma GCC optimize("Ofast")
//#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")

using namespace std;
typedef long long ll;

const long double Pi = acos(-1.0);
const ll dx[] = {0,0,1,-1};
const ll dy[] = {1,-1,0,0};
const ll N = (ll) 1e6 + 17;
const ll M = (ll) 5e3 + 69;
const ll inf = (ll) 1e14 + 3;
const ll mod = (ll) 1e9 + 7;
ll sq(ll x) { return x * x; }

ll zxc = 1, used[N];

pll p[N];
vector<ll> ans, g[N];

void dfs(ll v) {
    used[v] = 1;

    for(ll to : g[v])
        if(!used[to]) dfs(to);

    ans.pb(v);
}

void solve() {
    ll n, m;
    cin >> n >> m;

    ll sz = n + m - (__gcd(n, m) + 1);

    for(ll i = 0; i <= sz; i++) {
        if(0 <= i - n)
            g[i].pb(i - n);
        if(i + m <= sz)
            g[i].pb(i + m);
    }

    for(ll i = 0; i <= sz; i++) {
        if(!used[i]) dfs(i);
    }
    reverse(all(ans));

//    cout << "\n";
    for(ll i = 0; i < ans.size(); i++) {
//        cout << ans[i] << " ";
        p[i] = {ans[i], i};
    }
//    cout << "\n";
    sort(p, p + ans.size());

    cout << sz << "\n";
    for(ll i = 1; i < ans.size(); i++) {
        cout << (p[i].s - p[i - 1].s) << " ";
    }
    cout << "\n";

    ans.clear();
    for(ll i = 0; i <= sz; i++) g[i].clear(), used[i] = 0;
}

int main(/*Уверенно*/) {
ios_base::sync_with_stdio(0);
    cin.tie(0);
/*
	freopen(".in", "r", stdin);
	freopen(".out", "w", stdout);
*/
    cin >> zxc;
    while(zxc--) {
        solve();
    }
  	return 0;
}
// さよならさ いかなくちゃ
/*
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢸⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣦⡀⠀⠀⠀⢀⣀⣠⣤⣼⣿⣿⣿⣿⣿⣿⣿⣅⣀⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣹⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣷⣴⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣷⣯⣽⣢⢤⣀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿⣿⣿⣿⣿⣿⣿⣿⠿⢿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣯⡍⠲⣄⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢸⣿⣿⣿⣿⣿⣿⣿⣿⠀⠀⠀⠉⠉⢩⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠋⢢⣈⠫⢄⠀⠀⠀⠀⠀⠀⢀⡄⠂⢄⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣸⣿⣿⣿⣿⣿⣿⣿⡇⠀⠀⠀⠀⣰⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣦⣽⣿⣿⣿⣿⣽⣿⣿⣿⣿⣷⡧⠀⠀⠀⠀⢀⠎⠀⠀⠀⢃⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣿⣿⣿⣿⣿⣿⣿⡟⠀⠀⠀⠀⣸⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡿⣿⣟⣣⠀⠀⠀⡎⠀⠀⠀⠀⠀⡆⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣸⣿⣿⣿⣿⣿⣿⠏⠀⠀⠀⠀⢠⣿⣿⣿⣿⣿⣿⣿⣿⡋⣿⣿⣿⣿⣿⣿⣿⣿⣿⢿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡔⡄⠀⠁⠀⠀⠀⠀⠀⢰⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿⣿⣿⣿⠿⠋⠁⠀⠀⠀⠀⠀⣼⣿⣿⣿⣿⣿⣿⣿⣿⡇⣯⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣧⡇⢰⠇⠀⠀⠀⠀⠀⡘⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠉⠉⠀⠀⠀⠀⠀⠀⠀⠀⣼⣼⣿⣿⠿⣿⣿⣿⡿⢹⣿⣿⣿⣿⣿⣿⡽⣯⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡇⠎⠦⡀⠀⠀⠀⢀⠇⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⢢⣿⡇⣼⣧⣶⣿⣿⣿⠁⢸⢿⣿⣿⣿⣿⣿⣷⡘⣷⡹⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠧⡙⠀⠑⢄⣀⠤⠂⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣸⣟⣼⣿⣿⣿⣿⣿⣿⠀⠀⢛⣿⣿⣿⣿⣿⡿⣿⡬⠿⣾⡻⣿⣿⣿⣿⣿⣿⣿⣿⣿⢯⣿⣿⣿⣿⣿⣻⡆⢰⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠂⠀⣿⢻⣿⣿⣿⣿⣿⣿⣿⡏⠉⠉⠻⢿⣿⣿⣿⣿⣜⢿⣮⡙⠷⣦⣉⠓⢿⣷⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡇⠆⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⠤⠤⠤⠤⣀⠀⠘⠀⠀⣿⢸⢿⣿⣿⣿⣿⣿⠘⢿⠈⠁⠐⠄⠙⢟⢿⣿⣿⣦⡵⣟⣶⣽⣿⣿⣿⣿⣿⣿⣿⣿⣯⣾⣿⣿⣿⣿⣼⣿⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⢀⠎⠀⠀⠀⠀⠀⠀⠑⠆⠀⠀⣿⠀⣿⣿⣿⣿⣿⣿⣀⣬⣧⣖⣢⠄⠀⠀⠀⠈⠑⠈⠹⠿⠋⠘⣿⣿⣿⡆⣿⣿⣿⡏⡧⣿⣿⣿⣿⣿⣿⣿⣧⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠊⠀⠀⠀⠀⠀⠀⠀⠀⠈⢆⠀⢿⠀⢹⣿⣿⣿⣿⣿⣿⡿⠻⣿⣿⣿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠘⢮⠴⢃⣿⣿⣿⣿⣷⡟⣿⣿⣿⣿⣿⣟⣿⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠸⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠄⠸⡆⡄⢿⣿⣿⣿⣿⣿⡻⢄⠙⢿⣻⠃⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣾⢻⣿⣿⣿⢈⣷⣿⣿⣿⣿⣿⣿⣿⡆⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⡆⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢱⠐⠹⣵⠀⣿⣿⣿⣿⣿⢿⠦⠀⠀⠀⠀⠀⠀⠂⠀⠀⠀⠀⠀⠀⠀⡠⠞⠁⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡷⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⡁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢸⠀⠀⠘⢦⣿⣿⣿⣿⣿⣮⣆⠀⠀⠀⠀⠀⠈⠂⠀⠀⠀⠀⠀⠀⠀⠀⠀⣠⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣇⢣⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠸⠀⠀⠀⢸⣿⣿⣿⣿⣿⣿⣿⣦⣤⡤⠀⠀⠀⠀⢀⣀⣀⣀⡀⠀⠀⢀⠴⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡌⡆⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⢰⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⡅⠀⠀⠀⣾⠇⣿⣿⣿⣿⣿⣿⣿⣿⣶⣄⡀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣠⣶⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣷⠘⡀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⡜⠀⠀⠀⣸⡟⠀⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣷⣢⢄⠀⠀⢀⣤⣶⣿⢟⣿⣿⣿⣿⠰⢸⠾⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡆⢡⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠰⡀⠀⠀⠀⠀⠀⠀⢀⠜⠀⠀⠀⣰⡟⠀⢸⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠇⠉⣫⢻⡿⠛⢁⢾⣿⣿⣿⡇⠇⡜⠀⡿⣻⣿⣿⣿⣿⣿⣿⣿⣿⣻⡈⡆⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠑⢄⠀⠀⠀⡠⠔⠁⠀⠀⠀⣰⡟⠀⠀⣟⣿⣿⣿⣿⣿⣿⠿⠛⠋⠉⠉⠛⠻⢗⠏⠏⢸⢇⢠⠟⣾⣿⣿⣿⣱⠊⠀⠀⡿⡞⣿⣿⣿⣿⣿⣿⣿⣿⣿⣷⢸⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠉⠈⠁⠀⠀⠀⠀⢀⡾⠋⠀⠀⣸⠇⣿⣹⣿⣿⣿⣇⠀⠀⠀⠀⠀⠀⠀⡈⠀⠀⠸⢻⠋⢸⣿⣿⣿⢿⠃⠀⠀⠀⣇⠗⢿⡇⢹⣿⣿⢿⣿⣿⣿⣿⣏⡆⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⡰⠛⠁⠀⠀⢠⡟⢀⣿⣿⣿⣿⣿⡟⣄⠀⠀⠀⠀⢠⣴⣧⣤⣄⣠⠣⣀⣿⣿⣿⣟⠎⠀⠀⠀⠀⣽⠀⠘⣿⠊⠫⡺⣷⣌⠉⡿⢿⣿⡇⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⡠⠊⠀⠀⠀⢀⡠⣾⣁⣼⣿⣿⣿⢹⣿⡇⠈⠑⠂⠀⠀⠈⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣽⣿⣿⠇⡜⠘⡄⠀⠹⣧⠀⠈⠪⢙⢻⠷⠦⠿⣿⡄⠀⠀
⠀⠀⢀⣀⠀⠀⠀⠀⠀⠀⠀⠀⠀⡠⠊⠀⣀⠔⣒⣵⣾⣿⣿⣿⣿⣿⣿⡇⢸⣿⠀⠀⡇⠀⠀⠀⠀⣿⣿⣿⣿⠿⣿⣿⣿⣿⣿⣿⣿⣿⢋⡼⠔⠀⠉⢄⡀⠙⣧⠀⣀⡴⠉⠉⠉⠉⠹⣷⡀⠀
⠀⠈⢏⣷⣮⣕⠢⠀⠀⠀⠀⢠⠞⢀⠔⢉⣴⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⠁⣸⠃⠀⠠⠃⠀⠀⠀⢐⡨⠋⠀⣗⡄⢸⣿⣿⡿⡿⣿⡿⢣⠊⠀⠀⠀⠀⠀⠈⠑⠚⠻⣿⣄⣀⡀⠀⢀⣠⣿⣗⡀
⠀⠀⠀⢻⣿⣿⣿⣄⢂⠀⢠⣟⠔⠁⣰⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡟⢀⠏⣀⠞⠀⠀⠀⠀⠀⠈⠀⠀⠀⣿⠀⢸⣿⣟⠀⢣⠀⡰⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠉⠛⠛⠛⠛⠊⢸⣿⡝
⠀⠀⠀⠀⢻⣿⣿⣿⣆⢃⢸⡏⢀⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣧⣾⣿⡁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠘⣧⢸⣿⡟⠀⠸⠊⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣼⣿⣷
⠀⠀⠀⠀⠀⢻⣿⣿⣿⡞⡔⣣⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣄⠀⠀⠀⠀⠀⠀⠀⠀⣠⠀⠘⠻⡼⣇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⡞⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿⢻⣿
⠀⠀⠀⠀⠀⠀⢻⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣆⠀⠀⠀⠀⠀⠀⢀⠇⠀⠀⠀⠑⠌⠢⠀⣀⣀⠀⠀⠀⠀⠀⠀⣽⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢰⣿⢸⣿
⠀⠀⠀⠀⠀⠀⠈⢿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣧⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣠⣰⣿⣿⣯⣆⠀⠀⠀⠀⠀⠃⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣼⣿⢸⣿
⠀⠀⠀⠀⠀⠀⠀⠈⣏⠻⢿⣿⣿⣿⣿⣿⣿⡇⠿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣷⡄⠀⠀⠆⠀⢀⣠⢰⣿⣿⣿⣿⣿⣿⣿⣿⡆⠀⠀⠀⠜⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢠⣿⡟⢸⡟
⠀⠀⠀⠀⠀⠀⠀⠀⢸⢇⠈⢿⣿⣿⣿⣿⣿⠁⢀⢿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡄⡈⣠⣶⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣆⠀⢠⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣾⡟⢁⡟⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠘⠀⠆⠈⢿⣿⣿⣿⡇⠀⢸⠀⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣧⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡄⡎⠀⠀⠀⠀⠀⣀⣀⣀⣀⣀⣰⣏⣀⣊⣀⣀
*/

Compilation message

sequence.cpp: In function 'void solve()':
sequence.cpp:67:21: warning: comparison of integer expressions of different signedness: 'll' {aka 'long long int'} and 'std::vector<long long int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   67 |     for(ll i = 0; i < ans.size(); i++) {
      |                   ~~^~~~~~~~~~~~
sequence.cpp:75:21: warning: comparison of integer expressions of different signedness: 'll' {aka 'long long int'} and 'std::vector<long long int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   75 |     for(ll i = 1; i < ans.size(); i++) {
      |                   ~~^~~~~~~~~~~~
# 결과 실행 시간 메모리 Grader output
1 Correct 16 ms 23756 KB Ok
2 Correct 13 ms 23688 KB Ok
3 Correct 13 ms 23816 KB Ok
4 Correct 15 ms 23756 KB Ok
5 Correct 16 ms 23756 KB Ok
6 Correct 13 ms 23804 KB Ok
7 Correct 12 ms 23736 KB Ok
8 Correct 16 ms 23796 KB Ok
9 Correct 13 ms 23804 KB Ok
10 Correct 12 ms 23792 KB Ok
11 Correct 14 ms 23756 KB Ok
12 Correct 13 ms 23700 KB Ok
# 결과 실행 시간 메모리 Grader output
1 Correct 12 ms 23788 KB Ok
2 Correct 13 ms 23756 KB Ok
3 Correct 13 ms 23804 KB Ok
4 Correct 14 ms 23756 KB Ok
5 Correct 13 ms 23808 KB Ok
6 Correct 18 ms 24012 KB Ok
7 Correct 24 ms 25016 KB Ok
8 Correct 20 ms 24316 KB Ok
9 Correct 26 ms 25196 KB Ok
10 Correct 24 ms 24652 KB Ok
# 결과 실행 시간 메모리 Grader output
1 Correct 13 ms 23704 KB Ok
2 Correct 14 ms 23756 KB Ok
3 Correct 16 ms 23796 KB Ok
4 Correct 14 ms 23804 KB Ok
5 Correct 14 ms 23752 KB Ok
6 Correct 12 ms 23756 KB Ok
7 Correct 13 ms 23788 KB Ok
8 Correct 13 ms 23708 KB Ok
9 Correct 16 ms 23756 KB Ok
10 Correct 12 ms 23756 KB Ok
11 Correct 13 ms 23716 KB Ok
# 결과 실행 시간 메모리 Grader output
1 Correct 15 ms 23756 KB Ok
2 Correct 16 ms 23696 KB Ok
3 Correct 13 ms 23752 KB Ok
4 Correct 13 ms 23808 KB Ok
5 Correct 13 ms 23756 KB Ok
6 Correct 111 ms 44960 KB Ok
7 Correct 105 ms 45040 KB Ok
8 Correct 171 ms 48328 KB Ok
9 Correct 150 ms 43984 KB Ok
10 Correct 96 ms 38272 KB Ok
11 Correct 138 ms 50224 KB Ok
# 결과 실행 시간 메모리 Grader output
1 Correct 16 ms 23756 KB Ok
2 Correct 13 ms 23688 KB Ok
3 Correct 13 ms 23816 KB Ok
4 Correct 15 ms 23756 KB Ok
5 Correct 16 ms 23756 KB Ok
6 Correct 13 ms 23804 KB Ok
7 Correct 12 ms 23736 KB Ok
8 Correct 16 ms 23796 KB Ok
9 Correct 13 ms 23804 KB Ok
10 Correct 12 ms 23792 KB Ok
11 Correct 14 ms 23756 KB Ok
12 Correct 13 ms 23700 KB Ok
13 Correct 13 ms 23704 KB Ok
14 Correct 14 ms 23756 KB Ok
15 Correct 16 ms 23796 KB Ok
16 Correct 14 ms 23804 KB Ok
17 Correct 14 ms 23752 KB Ok
18 Correct 12 ms 23756 KB Ok
19 Correct 13 ms 23788 KB Ok
20 Correct 13 ms 23708 KB Ok
21 Correct 16 ms 23756 KB Ok
22 Correct 12 ms 23756 KB Ok
23 Correct 13 ms 23716 KB Ok
24 Correct 14 ms 24012 KB Ok
25 Correct 14 ms 24004 KB Ok
26 Correct 15 ms 24052 KB Ok
27 Correct 20 ms 24084 KB Ok
28 Correct 14 ms 23920 KB Ok
29 Correct 17 ms 23908 KB Ok
30 Correct 16 ms 24012 KB Ok
31 Correct 14 ms 24012 KB Ok
32 Correct 16 ms 24012 KB Ok
33 Correct 14 ms 24064 KB Ok
34 Correct 18 ms 24316 KB Ok
35 Correct 22 ms 24316 KB Ok
36 Correct 23 ms 24396 KB Ok
37 Correct 18 ms 24336 KB Ok
38 Correct 18 ms 24268 KB Ok
39 Correct 19 ms 24236 KB Ok
40 Correct 20 ms 24292 KB Ok
41 Correct 21 ms 24260 KB Ok
42 Correct 18 ms 24308 KB Ok
43 Correct 18 ms 24268 KB Ok
# 결과 실행 시간 메모리 Grader output
1 Correct 16 ms 23756 KB Ok
2 Correct 13 ms 23688 KB Ok
3 Correct 13 ms 23816 KB Ok
4 Correct 15 ms 23756 KB Ok
5 Correct 16 ms 23756 KB Ok
6 Correct 13 ms 23804 KB Ok
7 Correct 12 ms 23736 KB Ok
8 Correct 16 ms 23796 KB Ok
9 Correct 13 ms 23804 KB Ok
10 Correct 12 ms 23792 KB Ok
11 Correct 14 ms 23756 KB Ok
12 Correct 13 ms 23700 KB Ok
13 Correct 12 ms 23788 KB Ok
14 Correct 13 ms 23756 KB Ok
15 Correct 13 ms 23804 KB Ok
16 Correct 14 ms 23756 KB Ok
17 Correct 13 ms 23808 KB Ok
18 Correct 18 ms 24012 KB Ok
19 Correct 24 ms 25016 KB Ok
20 Correct 20 ms 24316 KB Ok
21 Correct 26 ms 25196 KB Ok
22 Correct 24 ms 24652 KB Ok
23 Correct 13 ms 23704 KB Ok
24 Correct 14 ms 23756 KB Ok
25 Correct 16 ms 23796 KB Ok
26 Correct 14 ms 23804 KB Ok
27 Correct 14 ms 23752 KB Ok
28 Correct 12 ms 23756 KB Ok
29 Correct 13 ms 23788 KB Ok
30 Correct 13 ms 23708 KB Ok
31 Correct 16 ms 23756 KB Ok
32 Correct 12 ms 23756 KB Ok
33 Correct 13 ms 23716 KB Ok
34 Correct 14 ms 24012 KB Ok
35 Correct 14 ms 24004 KB Ok
36 Correct 15 ms 24052 KB Ok
37 Correct 20 ms 24084 KB Ok
38 Correct 14 ms 23920 KB Ok
39 Correct 17 ms 23908 KB Ok
40 Correct 16 ms 24012 KB Ok
41 Correct 14 ms 24012 KB Ok
42 Correct 16 ms 24012 KB Ok
43 Correct 14 ms 24064 KB Ok
44 Correct 18 ms 24316 KB Ok
45 Correct 22 ms 24316 KB Ok
46 Correct 23 ms 24396 KB Ok
47 Correct 18 ms 24336 KB Ok
48 Correct 18 ms 24268 KB Ok
49 Correct 19 ms 24236 KB Ok
50 Correct 20 ms 24292 KB Ok
51 Correct 21 ms 24260 KB Ok
52 Correct 18 ms 24308 KB Ok
53 Correct 18 ms 24268 KB Ok
54 Correct 101 ms 31716 KB Ok
55 Correct 116 ms 32096 KB Ok
56 Correct 102 ms 32132 KB Ok
57 Correct 102 ms 30824 KB Ok
58 Correct 104 ms 31940 KB Ok
59 Correct 103 ms 31412 KB Ok
60 Correct 86 ms 30828 KB Ok
61 Correct 85 ms 31456 KB Ok
62 Correct 127 ms 32300 KB Ok
63 Correct 94 ms 31116 KB Ok
64 Correct 116 ms 32008 KB Ok
65 Correct 109 ms 31920 KB Ok
66 Correct 97 ms 31600 KB Ok
67 Correct 79 ms 31168 KB Ok
68 Correct 99 ms 31796 KB Ok
69 Correct 268 ms 40820 KB Ok
70 Correct 251 ms 40680 KB Ok
71 Correct 209 ms 38660 KB Ok
72 Correct 230 ms 40888 KB Ok
73 Correct 248 ms 38984 KB Ok
74 Correct 229 ms 39836 KB Ok
75 Correct 257 ms 40448 KB Ok
76 Correct 240 ms 40676 KB Ok
77 Correct 217 ms 39500 KB Ok
78 Correct 250 ms 40760 KB Ok
79 Correct 260 ms 39996 KB Ok
80 Correct 234 ms 38908 KB Ok
81 Correct 228 ms 40760 KB Ok
82 Correct 242 ms 39988 KB Ok
83 Correct 242 ms 40768 KB Ok
# 결과 실행 시간 메모리 Grader output
1 Correct 16 ms 23756 KB Ok
2 Correct 13 ms 23688 KB Ok
3 Correct 13 ms 23816 KB Ok
4 Correct 15 ms 23756 KB Ok
5 Correct 16 ms 23756 KB Ok
6 Correct 13 ms 23804 KB Ok
7 Correct 12 ms 23736 KB Ok
8 Correct 16 ms 23796 KB Ok
9 Correct 13 ms 23804 KB Ok
10 Correct 12 ms 23792 KB Ok
11 Correct 14 ms 23756 KB Ok
12 Correct 13 ms 23700 KB Ok
13 Correct 12 ms 23788 KB Ok
14 Correct 13 ms 23756 KB Ok
15 Correct 13 ms 23804 KB Ok
16 Correct 14 ms 23756 KB Ok
17 Correct 13 ms 23808 KB Ok
18 Correct 18 ms 24012 KB Ok
19 Correct 24 ms 25016 KB Ok
20 Correct 20 ms 24316 KB Ok
21 Correct 26 ms 25196 KB Ok
22 Correct 24 ms 24652 KB Ok
23 Correct 13 ms 23704 KB Ok
24 Correct 14 ms 23756 KB Ok
25 Correct 16 ms 23796 KB Ok
26 Correct 14 ms 23804 KB Ok
27 Correct 14 ms 23752 KB Ok
28 Correct 12 ms 23756 KB Ok
29 Correct 13 ms 23788 KB Ok
30 Correct 13 ms 23708 KB Ok
31 Correct 16 ms 23756 KB Ok
32 Correct 12 ms 23756 KB Ok
33 Correct 13 ms 23716 KB Ok
34 Correct 15 ms 23756 KB Ok
35 Correct 16 ms 23696 KB Ok
36 Correct 13 ms 23752 KB Ok
37 Correct 13 ms 23808 KB Ok
38 Correct 13 ms 23756 KB Ok
39 Correct 111 ms 44960 KB Ok
40 Correct 105 ms 45040 KB Ok
41 Correct 171 ms 48328 KB Ok
42 Correct 150 ms 43984 KB Ok
43 Correct 96 ms 38272 KB Ok
44 Correct 138 ms 50224 KB Ok
45 Correct 14 ms 24012 KB Ok
46 Correct 14 ms 24004 KB Ok
47 Correct 15 ms 24052 KB Ok
48 Correct 20 ms 24084 KB Ok
49 Correct 14 ms 23920 KB Ok
50 Correct 17 ms 23908 KB Ok
51 Correct 16 ms 24012 KB Ok
52 Correct 14 ms 24012 KB Ok
53 Correct 16 ms 24012 KB Ok
54 Correct 14 ms 24064 KB Ok
55 Correct 18 ms 24316 KB Ok
56 Correct 22 ms 24316 KB Ok
57 Correct 23 ms 24396 KB Ok
58 Correct 18 ms 24336 KB Ok
59 Correct 18 ms 24268 KB Ok
60 Correct 19 ms 24236 KB Ok
61 Correct 20 ms 24292 KB Ok
62 Correct 21 ms 24260 KB Ok
63 Correct 18 ms 24308 KB Ok
64 Correct 18 ms 24268 KB Ok
65 Correct 101 ms 31716 KB Ok
66 Correct 116 ms 32096 KB Ok
67 Correct 102 ms 32132 KB Ok
68 Correct 102 ms 30824 KB Ok
69 Correct 104 ms 31940 KB Ok
70 Correct 103 ms 31412 KB Ok
71 Correct 86 ms 30828 KB Ok
72 Correct 85 ms 31456 KB Ok
73 Correct 127 ms 32300 KB Ok
74 Correct 94 ms 31116 KB Ok
75 Correct 116 ms 32008 KB Ok
76 Correct 109 ms 31920 KB Ok
77 Correct 97 ms 31600 KB Ok
78 Correct 79 ms 31168 KB Ok
79 Correct 99 ms 31796 KB Ok
80 Correct 268 ms 40820 KB Ok
81 Correct 251 ms 40680 KB Ok
82 Correct 209 ms 38660 KB Ok
83 Correct 230 ms 40888 KB Ok
84 Correct 248 ms 38984 KB Ok
85 Correct 229 ms 39836 KB Ok
86 Correct 257 ms 40448 KB Ok
87 Correct 240 ms 40676 KB Ok
88 Correct 217 ms 39500 KB Ok
89 Correct 250 ms 40760 KB Ok
90 Correct 260 ms 39996 KB Ok
91 Correct 234 ms 38908 KB Ok
92 Correct 228 ms 40760 KB Ok
93 Correct 242 ms 39988 KB Ok
94 Correct 242 ms 40768 KB Ok
95 Correct 237 ms 44488 KB Ok
96 Correct 364 ms 54452 KB Ok
97 Correct 341 ms 49232 KB Ok
98 Correct 239 ms 49108 KB Ok
99 Correct 264 ms 48160 KB Ok
100 Correct 306 ms 48188 KB Ok
101 Correct 306 ms 51716 KB Ok
102 Correct 309 ms 49240 KB Ok
103 Correct 302 ms 51104 KB Ok
104 Correct 346 ms 52964 KB Ok
105 Correct 382 ms 53928 KB Ok
106 Correct 254 ms 53292 KB Ok
107 Correct 313 ms 52568 KB Ok
108 Correct 373 ms 53900 KB Ok
109 Correct 297 ms 54928 KB Ok
110 Correct 1283 ms 93420 KB Ok
111 Correct 1492 ms 94164 KB Ok
112 Correct 1458 ms 87584 KB Ok
113 Correct 1250 ms 93248 KB Ok
114 Correct 1403 ms 86360 KB Ok
115 Correct 1497 ms 94420 KB Ok
116 Correct 1462 ms 93068 KB Ok
117 Correct 1387 ms 94232 KB Ok
118 Correct 1413 ms 84948 KB Ok
119 Correct 1408 ms 93528 KB Ok
120 Correct 1372 ms 94296 KB Ok
121 Correct 1343 ms 90968 KB Ok
122 Correct 1315 ms 93924 KB Ok
123 Correct 1480 ms 90936 KB Ok
124 Correct 1367 ms 86760 KB Ok
125 Correct 473 ms 77800 KB Ok