結果
| 問題 | No.2246 1333-like Number |
| コンテスト | |
| ユーザー |
momoyuu
|
| 提出日時 | 2023-10-24 16:01:24 |
| 言語 | C++23 (gcc 15.3.0 + boost 1.92.0 + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 5 ms / 2,000 ms |
| + 129µs | |
| コード長 | 733 bytes |
| 記録 | |
| コンパイル時間 | 1,236 ms |
| コンパイル使用メモリ | 189,580 KB |
| 実行使用メモリ | 6,272 KB |
| 最終ジャッジ日時 | 2026-09-03 02:46:35 |
| 合計ジャッジ時間 | 3,067 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 24 |
ソースコード
#include<iostream>
#include<algorithm>
#include<stack>
#include<vector>
#include<set>
#include<string>
#include<cstdint>
#include<queue>
using namespace std;
using ll = long long;
int main(){
cin.tie(nullptr);
ios::sync_with_stdio(false);
int n;
cin>>n;
deque<pair<pair<int,int>,int>> que;
for(int i = 1;i<=9;i++){
for(int j = i+1;j<=9;j++){
que.push_back(make_pair(make_pair(i,j),1));
}
}
while(n>1){
n--;
auto now = que.front();
que.pop_front();
now.second++;
que.push_back(now);
}
auto now = que.front();
cout<<now.first.first;
for(int i = 0;i<now.second;i++) cout<<now.first.second;
cout<<endl;
}
momoyuu