結果
| 問題 |
No.1010 折って重ねて
|
| コンテスト | |
| ユーザー |
courange_cou
|
| 提出日時 | 2020-03-20 21:32:30 |
| 言語 | C (gcc 13.3.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 522 bytes |
| コンパイル時間 | 589 ms |
| コンパイル使用メモリ | 28,800 KB |
| 実行使用メモリ | 6,824 KB |
| 最終ジャッジ日時 | 2024-12-15 04:19:52 |
| 合計ジャッジ時間 | 1,638 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 10 WA * 33 |
ソースコード
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#define MAX(a,b) (a > b ? a : b)
#define MIN(a,b) (a < b ? a : b)
const int inf = 1000000000; // 10^9
int main(){
int x,y,h;scanf("%d %d %d",&x,&y,&h);
int ans=0;
x *= 1000;
y *= 1000;
while(1){
if(x>h){
//printf("x:%d,h:%d\n",x,h);
x/=2;
h*=2;
ans++;
}else if(y>h){
//printf("y:%d,h:%d\n",y,h);
y/=2;
h*=2;
ans++;
}else break;
}
printf("%d",ans);
}
courange_cou