結果
問題 | No.2198 Concon Substrings (COuNt-CONstruct Version) |
ユーザー |
![]() |
提出日時 | 2023-05-20 00:38:42 |
言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 624 bytes |
コンパイル時間 | 3,497 ms |
コンパイル使用メモリ | 247,876 KB |
実行使用メモリ | 6,824 KB |
最終ジャッジ日時 | 2024-12-21 02:27:48 |
合計ジャッジ時間 | 23,696 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 WA * 3 |
other | WA * 104 |
ソースコード
#include<bits/stdc++.h>using namespace std;using ll = long long;int main(){ll m;cin>>m;vector<char> ans;ll a = 10000;ll b = 10000;ll cnt = 0;ll now = 0;while(a>0||b>0){while(a&&b&&a*b+cnt<=m){cnt += a * b;ans.push_back('m');}if(now==0){b--;ans.push_back('o');}else{a--;ans.push_back('c');}now ^= 1;}reverse(ans.begin(),ans.end());assert(cnt==m);for(int i = 0;i<ans.size();i++){cout<<ans[i];}cout<<endl;}