結果
| 問題 | No.805 UMG |
| コンテスト | |
| ユーザー |
hato3617
|
| 提出日時 | 2019-03-22 22:04:55 |
| 言語 | C++11 (gcc 15.3.0 + boost 1.92.0) |
| 結果 |
WA
不安定
|
| 実行時間 | - |
| コード長 | 424 bytes |
| 記録 | |
| コンパイル時間 | 340 ms |
| コンパイル使用メモリ | 85,504 KB |
| 実行使用メモリ | 9,832 KB |
| 最終ジャッジ日時 | 2026-09-25 20:57:59 |
| 合計ジャッジ時間 | 9,903 ms |
|
ジャッジサーバーID (参考情報) |
judge4_0 / judge2_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 WA * 1 |
| other | AC * 6 WA * 14 TLE * 1 -- * 4 |
ソースコード
#include <iostream>
#include<string>
#include<vector>
#include<algorithm>
#include<map>
#include<cstdio>
using namespace std;
int main(){
int n;
cin >> n;
string s;
cin >> s;
int l = 0;
for (int i = 0; i < n-2; i++) {
for (int j = 0; j < n - 1; j++) {
for (int k = 0; k < n; k++) {
if (j - i == k - j>0&&s[i] == 'U'&&s[j] == 'M'&&s[k] == 'G') {
l += 1;
}
}
}
}
cout << l << endl;
return 0;
}
hato3617