結果
問題 | No.932 解法破綻!高橋君 |
ユーザー |
![]() |
提出日時 | 2019-11-29 21:45:04 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 4 ms / 2,000 ms |
コード長 | 2,076 bytes |
コンパイル時間 | 1,603 ms |
コンパイル使用メモリ | 172,668 KB |
実行使用メモリ | 6,820 KB |
最終ジャッジ日時 | 2024-11-20 21:47:05 |
合計ジャッジ時間 | 2,324 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 20 |
ソースコード
#include <bits/stdc++.h> using namespace std; #define rep(i,N) for(int i=0;i<int(N);++i) #define rep1(i,N) for(int i=1;i<int(N);++i) #define all(a) (a).begin(),(a).end() #define print(v) { cerr<<#v<<": [ "; for(auto _ : v) cerr<<_<<", "; cerr<<"]"<<endl; } #define printpair(v) { cerr<<#v<<": [ "; for(auto _ : v) cerr<<"{"<<_.first<<","<<_.second<<"}"<<", "; cerr<<"]"<<endl; } typedef long long ll; template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return true; } return false; } template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return true; } return false; } const int INF = 1e9; const ll INFLL = 1e18; const ll MOD = 1e9+7; const double PI = acos(-1.0); const int dx[8] = {1, 0, -1, 0, 1, -1, -1, 1}; const int dy[8] = {0, 1, 0, -1, 1, 1, -1, -1}; /*------------------------------------/ for library*/ template<typename T> vector<pair<T,int>> RunLengthEncoder(vector<T> &v){ vector<pair<T,int>> RLE; int cnt = 1; for(int i = 0; i < (int)v.size(); ++i){ if(i == (int)v.size()-1){ RLE.push_back(make_pair(v[i], cnt)); continue; } if(v[i] == v[i+1])cnt++; else{ RLE.push_back(make_pair(v[i],cnt)); cnt = 1; } } return RLE; } vector<pair<char,int>> RunLengthEncoder_ForString(string v){ vector<pair<char,int>> RLE; int cnt = 1; for(int i = 0; i < (int)v.size(); ++i){ if(i == (int)v.size()-1){ RLE.push_back(make_pair(v[i], cnt)); continue; } if(v[i] == v[i+1])cnt++; else{ RLE.push_back(make_pair(v[i],cnt)); cnt = 1; } } return RLE; } /*------------------------------------*/ int main() { cin.tie(0); ios::sync_with_stdio(false); cout << fixed << setprecision(20); string S; cin>>S; int N = S.size(); string ans = "Done!"; rep(i,N){ if(S[i] == ',')continue; if(S[i] == 'W'||S[i] =='T'||S[i]=='M'){ ans = "Failed..."; } } cout<<ans<<endl; }