結果
| 問題 |
No.295 hel__world
|
| コンテスト | |
| ユーザー |
Kmcode1
|
| 提出日時 | 2015-10-23 23:45:17 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
RE
|
| 実行時間 | - |
| コード長 | 368 bytes |
| コンパイル時間 | 1,400 ms |
| コンパイル使用メモリ | 158,684 KB |
| 実行使用メモリ | 6,948 KB |
| 最終ジャッジ日時 | 2024-09-13 03:41:19 |
| 合計ジャッジ時間 | 2,973 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | RE * 4 |
| other | AC * 14 WA * 17 RE * 22 |
コンパイルメッセージ
main.cpp: In function ‘int main()’:
main.cpp:9:6: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
9 | scanf("%lld",&kk[i]);
| ~~~~~^~~~~~~~~~~~~~~
ソースコード
#include<bits/stdc++.h>
using namespace std;
string s;
bool ap[26];
long long int kk[26];
long long int ans=0;
int main(){
for(int i=0;i<26;i++){
scanf("%lld",&kk[i]);
}
cin>>s;
for(int i=0;i<s.size();i++){
ap[s[i]-'a']=true;
}
for(int i=0;i<26;i++){
long long int k=kk[i];
if(ap[i]==false){
continue;
}
ans+=k;
if(ans>100000LL){
puts("hel");
return 0;
}
}
return 1;
}
Kmcode1