結果
問題 |
No.112 ややこしい鶴亀算
|
ユーザー |
![]() |
提出日時 | 2016-09-11 20:24:50 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 603 bytes |
コンパイル時間 | 572 ms |
コンパイル使用メモリ | 69,200 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-11-17 03:36:59 |
合計ジャッジ時間 | 1,576 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 WA * 1 |
other | AC * 4 WA * 19 |
ソースコード
#include<stdio.h> #include <vector> #include <list> #include <map> #include <set> #include <queue> #include <stack> #include <algorithm> #include <sstream> #include <iostream> #include <string> #include <stdio.h> using namespace std; int main() { int N, turu = 0, kame = 0, a[50]; cin >> N; int big=0, sml=50*4; for (int i = 0; i < N; i++) { int t; cin >> t; if (big < t) big = t; else if (t < sml) sml = t; if (sml > big) swap(sml , big); a[i] = t; } for (int i = 0; i < N; i++) { if (a[i] == big) turu++; else kame++; } cout<<kame << " " << turu << endl; return 0; }