結果
| 問題 |
No.35 タイパー高橋
|
| コンテスト | |
| ユーザー |
184
|
| 提出日時 | 2014-10-08 00:15:26 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 537 bytes |
| コンパイル時間 | 700 ms |
| コンパイル使用メモリ | 65,428 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-12-30 07:41:38 |
| 合計ジャッジ時間 | 1,226 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 1 WA * 3 |
コンパイルメッセージ
main.cpp: In function ‘int main()’:
main.cpp:24:27: warning: format ‘%s’ expects argument of type ‘char*’, but argument 3 has type ‘char (*)[100001]’ [-Wformat=]
24 | scanf("%d%s",&t,&s);
| ~^ ~~
| | |
| char* char (*)[100001]
main.cpp:19:14: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
19 | scanf("%d",&n);//%d%d%d%d%d%d%d%d%d",&n,&m,&a,&b,&c,&d,&e,&f,&x,&y);
| ~~~~~^~~~~~~~~
main.cpp:24:22: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
24 | scanf("%d%s",&t,&s);
| ~~~~~^~~~~~~~~~~~~~
ソースコード
#include <cstdlib>
#include <cstring>
#include <algorithm>
#include <iostream>
#include <map>
#include <vector>
#include <queue>
using namespace std;
/*
184 //名前が 184
no35
*/
int main(){
int n;//,m,a,b,c,d,e,f,x,y;
scanf("%d",&n);//%d%d%d%d%d%d%d%d%d",&n,&m,&a,&b,&c,&d,&e,&f,&x,&y);
char s[100001];
int t;
int ans=0,fans=0;
for(int i=0;i<n;i++){
scanf("%d%s",&t,&s);
if(t/12>=strlen(s))ans+=strlen(s);
else fans+=strlen(s)-t/12;
}
printf("%d %d\n",ans,fans);
return 0;
}
184