結果
問題 | No.745 letinopia raoha |
ユーザー | math957963 |
提出日時 | 2018-10-19 21:30:13 |
言語 | C++11 (gcc 11.4.0) |
結果 |
AC
|
実行時間 | 1 ms / 2,000 ms |
コード長 | 718 bytes |
コンパイル時間 | 325 ms |
コンパイル使用メモリ | 57,652 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-04-29 15:23:59 |
合計ジャッジ時間 | 746 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 0 ms
5,248 KB |
testcase_01 | AC | 0 ms
5,376 KB |
testcase_02 | AC | 1 ms
5,376 KB |
testcase_03 | AC | 0 ms
5,376 KB |
testcase_04 | AC | 1 ms
5,376 KB |
testcase_05 | AC | 0 ms
5,376 KB |
testcase_06 | AC | 1 ms
5,376 KB |
testcase_07 | AC | 1 ms
5,376 KB |
testcase_08 | AC | 0 ms
5,376 KB |
testcase_09 | AC | 1 ms
5,376 KB |
コンパイルメッセージ
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; }