結果
| 問題 | 
                            No.2209 Flip and Reverse
                             | 
                    
| コンテスト | |
| ユーザー | 
                             | 
                    
| 提出日時 | 2023-02-10 21:57:17 | 
| 言語 | C++14  (gcc 13.3.0 + boost 1.87.0)  | 
                    
| 結果 | 
                             
                                WA
                                 
                             
                            
                         | 
                    
| 実行時間 | - | 
| コード長 | 269 bytes | 
| コンパイル時間 | 1,277 ms | 
| コンパイル使用メモリ | 165,316 KB | 
| 実行使用メモリ | 6,948 KB | 
| 最終ジャッジ日時 | 2024-07-07 16:12:16 | 
| 合計ジャッジ時間 | 2,772 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge3 / judge5 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 4 | 
| other | AC * 9 WA * 21 | 
ソースコード
#include<bits/stdc++.h>
using namespace std;
const int N=1e6+10;
char s[N],t[N];
int n,ans;
int main(){
	scanf("%d",&n);
	scanf("%s",s);
	scanf("%s",t);
	int w=0;
	for (int i=0;i<n;i++) if (s[i]!=t[i]) ans++; else w=max(w,ans),ans=0;
	w=max(w,ans);
	printf("%d\n",w);
}