結果
| 問題 | No.3629 Maximize Subsequense Mex |
| コンテスト | |
| ユーザー |
ymm-knight
|
| 提出日時 | 2026-08-20 14:05:20 |
| 言語 | C++17 (gcc 15.2.0 + boost 1.90.0) |
| 結果 |
AC
|
| 実行時間 | 4 ms / 2,000 ms |
| + 477µs | |
| コード長 | 642 bytes |
| 記録 | |
| コンパイル時間 | 1,388 ms |
| コンパイル使用メモリ | 210,028 KB |
| 実行使用メモリ | 5,888 KB |
| 最終ジャッジ日時 | 2026-08-20 14:05:30 |
| 合計ジャッジ時間 | 7,515 ms |
|
ジャッジサーバーID (参考情報) |
judge2_0 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | AC * 27 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
#define Loop(x,l,r) for (ll x = ll(l); x < ll(r); x++)
#define LoopR(x,l,r) for (ll x = ll(r)-1; x >= ll(l); x--)
#define int ll
typedef long long ll;
typedef pair<int,int> pii;
typedef pair<ll,ll> pll;
#ifndef DB
#define DB 0
#define endl '\n'
#endif
#define debugl(l) if constexpr ((l) < DB)
#define debug debugl(0)
void solve()
{
int n;
cin >> n;
if (n < 10) {
cout << "0123456789"s.substr(0, n) << '\n';
return;
}
Loop (i,0,n)
cout << char('0' + (i+1)%10);
cout << '\n';
}
signed main()
{
cin.tie(0) -> sync_with_stdio(false);
int t = 1;
cin >> t;
while (t--)
solve();
}
ymm-knight