結果
| 問題 |
No.4 おもりと天秤
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2016-04-05 19:41:19 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 310 bytes |
| コンパイル時間 | 430 ms |
| コンパイル使用メモリ | 53,824 KB |
| 実行使用メモリ | 6,820 KB |
| 最終ジャッジ日時 | 2024-10-04 01:57:20 |
| 合計ジャッジ時間 | 1,500 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 13 WA * 10 |
ソースコード
#include <iostream>
#include <cstdio>
using namespace std;
int n;
int w[110];
int main(){
cin>>n;
for(int i=0;i<n;i++){
cin>>w[i];
}
int ans1=0,ans2=0;
for(int i=0;i<n;i++){
ans1+=w[i];
if(ans1>ans2){
ans2+=w[i];
}
}
if(ans2==ans1)cout<<"possible"<<endl;
else cout<<"impossible"<<endl;
}