結果
問題 |
No.203 ゴールデン・ウィーク(1)
|
ユーザー |
![]() |
提出日時 | 2021-03-13 12:15:20 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 1,000 ms |
コード長 | 553 bytes |
コンパイル時間 | 1,751 ms |
コンパイル使用メモリ | 192,576 KB |
最終ジャッジ日時 | 2025-01-19 16:06:14 |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 29 |
ソースコード
#include <bits/stdc++.h> using namespace std; typedef long long ll; #define rep(i,n) for(int i=0;i<n;i++) typedef pair<int,int>P; int main(){ string s1,s2; cin>>s1>>s2; int a[14]; rep(i,7){ if(s1.at(i)=='o'){ a[i]=1; } else{ a[i]=0; } } rep(i,7){ if(s2.at(i)=='o'){ a[i+7]=1; } else{ a[i+7]=0; } } int cnt=0; int maxcnt=0; rep(i,14){ if(a[i]==1){ cnt++; maxcnt=max(maxcnt,cnt); } else{ cnt=0; } } cout<<maxcnt<<endl; return 0; }