結果
| 問題 |
No.745 letinopia raoha
|
| コンテスト | |
| ユーザー |
math957963
|
| 提出日時 | 2018-10-19 21:30:13 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
AC
|
| 実行時間 | 1 ms / 2,000 ms |
| コード長 | 718 bytes |
| コンパイル時間 | 357 ms |
| コンパイル使用メモリ | 57,448 KB |
| 実行使用メモリ | 6,820 KB |
| 最終ジャッジ日時 | 2024-11-18 20:02:27 |
| 合計ジャッジ時間 | 893 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 8 |
コンパイルメッセージ
main.cpp: In function ‘int main()’:
main.cpp:26:14: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
26 | scanf("%d %d %d %d",&w, &x, &y, &z);
| ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ソースコード
#include<cstdio>
#include<cstdlib>
#include<cstring>
#include<cmath>
#include<algorithm>
#include<functional>
#include<vector>
#include<queue>
#include<stack>
#include<set>
#include<map>
using namespace std;
#define MOD 1000000007
#define f(i,n) for(int i=0;i<int(n);i++)
#define N 200000
int main(){
int n, k;
int w, x, y, z;
int s, ans;
bool v = true;
s = 0;
k = 1;
ans = 0;
scanf("%d %d %d %d",&w, &x, &y, &z);
if(z>=10)printf("Impossible\n");
else{
f(i, x){
s++;
if (s > 100){
k = k * 2;
s -= 100;
}
ans += (k*50);
}
f(i, w){
s++;
if (s > 100){
k = k * 2;
s -= 100;
}
ans += (k * 100);
}
printf("Possible\n");
printf("%d\n", ans);
}
return 0;
}
math957963