結果
| 問題 | No.1010 折って重ねて |
| コンテスト | |
| ユーザー |
momohara
|
| 提出日時 | 2020-03-20 23:16:14 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 1,917 bytes |
| コンパイル時間 | 1,039 ms |
| コンパイル使用メモリ | 102,792 KB |
| 実行使用メモリ | 6,824 KB |
| 最終ジャッジ日時 | 2024-12-15 14:20:37 |
| 合計ジャッジ時間 | 2,442 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 26 WA * 17 |
ソースコード
#include<iostream>
#include<queue>
#include<stack>
#include<vector>
#include<set>
#include<map>
#include<algorithm>
#include<cstring>
#include<string>
#include<cassert>
#include<cmath>
#include<climits>
#include<iomanip>
#include<bitset>
#include<unordered_map>
using namespace std;
#define rep(i,m,n) for(int (i)=(int)(m);(i)<(int)(n);(i)++)
#define rep2(i,m,n) for(int (i)=(int)(n)-1;(i)>=(int)(m);(i)--)
#define REP(i,n) rep(i,0,n)
#define REP2(i,n) rep2(i,0,n)
#define FOR(i,c) for(decltype((c).begin())i=(c).begin();i!=(c).end();++i)
#define ll long long
#define ull unsigned long long
#define all(hoge) (hoge).begin(),(hoge).end()
#define en '\n'
typedef pair<ll, ll> P;
constexpr long long INF = 1LL << 60;
constexpr int INF_INT = 1 << 25;
constexpr long long MOD = (ll)1e9+7;
typedef vector<ll> Array;
typedef vector<Array> Matrix;
template <class T> using vec = vector<T>;
template <class T> using vvec = vector<vec<T>>;
template<class T> inline bool chmin(T& a, T b) {
if (a > b) {
a = b;
return true;
}
return false;
}
template<class T> inline bool chmax(T& a, T b) {
if (a < b) {
a = b;
return true;
}
return false;
}
struct Edge {
int to, cap, rev;
Edge(int _to, int _cap, int _rev) {
to = _to; cap = _cap; rev = _rev;
}
};
typedef vector<Edge> Edges;
typedef vector<Edges> Graph;
void add_edge(Graph& G, int from, int to, int cap, bool revFlag, int revCap) {
G[from].push_back(Edge(to, cap, G[to].size()));
if (revFlag)G[to].push_back(Edge(from, revCap, G[from].size() - 1));
}
void solve() {
ll x, y, h;
cin >> x >> y >> h;
ll n1 = log2(x * 1000);
ll n2 = log2(y * 1000);
ll nh = log2(h);
if (n2 < n1)swap(n1, n2);
ll con = 0;
chmax(con, (n1 - nh) / 2 +1);
nh += con;
chmax(con, con+(n2 - nh) / 2 +1);
cout << con << en;
}
int main() {
ios::sync_with_stdio(false);
cin.tie(0);
cout.tie(0);
solve();
//int t; cin >> t; REP(i, t) solve();
return 0;
}
momohara