結果
問題 |
No.3015 右に寄せろ!
|
ユーザー |
![]() |
提出日時 | 2025-01-25 13:06:47 |
言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
結果 |
TLE
|
実行時間 | - |
コード長 | 760 bytes |
コンパイル時間 | 3,462 ms |
コンパイル使用メモリ | 276,260 KB |
実行使用メモリ | 21,424 KB |
最終ジャッジ日時 | 2025-01-25 22:34:06 |
合計ジャッジ時間 | 40,186 ms |
ジャッジサーバーID (参考情報) |
judge8 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 24 WA * 1 TLE * 11 |
ソースコード
#include <bits/stdc++.h> using namespace std; using ll = long long; template<typename T> using vc = vector<T>; template<typename T> using vv = vc<vc<T>>; using vl = vc<ll>; using vs = vc<string>; #define rep(i,n) for(ll i=0;i<(n);i++) #define pb push_back #define pob pop_back #define YES cout<<"Yes"<<endl #define NO cout<<"No"<<endl #define YN {cout<<"Yes"<<endl;}else{cout<<"No"<<endl;} #define M1 cout<<"-1"<<endl #define INF (ll)4e18 vl dx = {1,-1,0,0};vl dy = {0,0,1,-1}; int main(){ string s; cin >> s; ll count=0; rep(i,s.size()){ if(s[i]=='1' && s[i+1]=='1' && s[i+2]=='0'){ count++; swap(s[i],s[i+2]); //cout << s << endl; if(i>=5)i-=5; } } cout << count << endl; }