結果
問題 | No.700 LOVE |
ユーザー |
|
提出日時 | 2018-06-15 22:47:23 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 626 bytes |
コンパイル時間 | 648 ms |
コンパイル使用メモリ | 66,704 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-07-22 23:17:05 |
合計ジャッジ時間 | 1,332 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 16 |
コンパイルメッセージ
main.cpp:4:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] 4 | main(){ | ^~~~
ソースコード
#include<iostream> using namespace std; main(){ int n,m; bool flag = false; cin >> n >> m; string love[n]; for(int i=0; i<n; i++){ cin >> love[i]; } for(int j=0; j<n; j++){ for(int k=0; k<m-3; k++){ char a,b,c,d; a = love[j][k]; b = love[j][k+1]; c = love[j][k+2]; d = love[j][k+3]; if (a=='L'&&b=='O'){ if(c=='V'&&d=='E'){ flag = true; } } } } if (flag){ cout << "YES"; }else{ cout << "NO"; } }