結果
| 問題 |
No.346 チワワ数え上げ問題
|
| コンテスト | |
| ユーザー |
horiesiniti
|
| 提出日時 | 2016-07-17 17:48:21 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
AC
|
| 実行時間 | 4 ms / 2,000 ms |
| コード長 | 331 bytes |
| コンパイル時間 | 540 ms |
| コンパイル使用メモリ | 54,624 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-10-15 15:24:35 |
| 合計ジャッジ時間 | 1,800 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 23 |
ソースコード
#include <iostream>
#include <string>
using namespace std;
int main() {
// your code goes here
long long int rf[3]={0};
std::string str;
std::cin>>str;
for(int i=0;i<str.size();i++){
char c=str[i];
if(c=='c'){
rf[0]++;
}else if(c=='w'){
rf[2]+=rf[1];
rf[1]+=rf[0];
}
}
std::cout<<rf[2]<<"\n";
return 0;
}
horiesiniti