結果
| 問題 | No.29 パワーアップ |
| コンテスト | |
| ユーザー |
testestest
|
| 提出日時 | 2015-08-05 03:44:14 |
| 言語 | C90(gcc12) (gcc 12.4.0) |
| 結果 |
AC
|
| 実行時間 | 0 ms / 5,000 ms |
| + 664µs | |
| コード長 | 184 bytes |
| 記録 | |
| コンパイル時間 | 45 ms |
| コンパイル使用メモリ | 30,080 KB |
| 実行使用メモリ | 5,888 KB |
| 最終ジャッジ日時 | 2026-07-24 00:30:30 |
| 合計ジャッジ時間 | 1,852 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 22 |
コンパイルメッセージ
main.c: In function ‘main’:
main.c:4:1: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
4 | scanf("%d",&n);n*=3;
| ^~~~~~~~~~~~~~
main.c:5:12: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
5 | while(n--){scanf("%d",&t);a[t-1]++;}t=0;
| ^~~~~~~~~~~~~~
ソースコード
#include <stdio.h>
int main(){
int n,a[10]={},t,i=10,s=0;
scanf("%d",&n);n*=3;
while(n--){scanf("%d",&t);a[t-1]++;}t=0;
while(i--){s+=a[i]/2;t+=a[i]&1;}
printf("%d",s+t/4);
return 0;
}
testestest