Search is not available for this dataset
name
stringlengths
2
88
description
stringlengths
31
8.62k
public_tests
dict
private_tests
dict
solution_type
stringclasses
2 values
programming_language
stringclasses
5 values
solution
stringlengths
1
983k
p03901 CODE FESTIVAL 2016 Elimination Tournament Round 2 (Parallel) - Takahashi is Missing!
Aoki is in search of Takahashi, who is missing in a one-dimentional world. Initially, the coordinate of Aoki is 0, and the coordinate of Takahashi is known to be x, but his coordinate afterwards cannot be known to Aoki. Time is divided into turns. In each turn, Aoki and Takahashi take the following actions simultaneou...
{ "input": [ "6\n40", "101\n80", "3\n100" ], "output": [ "7.5000000", "63.7500000", "2.0000000" ] }
{ "input": [], "output": [] }
CORRECT
cpp
#define _CRT_SECURE_NO_WARNINGS #include <iostream> #include <iomanip> #include <stdio.h> #include <algorithm> #include <math.h> #include <numeric> #include <iterator> #include <fstream> #include <math.h> #include <random> #include <vector> #include <string> #include <stack> #include <set> #include <map> #include <deq...
p03901 CODE FESTIVAL 2016 Elimination Tournament Round 2 (Parallel) - Takahashi is Missing!
Aoki is in search of Takahashi, who is missing in a one-dimentional world. Initially, the coordinate of Aoki is 0, and the coordinate of Takahashi is known to be x, but his coordinate afterwards cannot be known to Aoki. Time is divided into turns. In each turn, Aoki and Takahashi take the following actions simultaneou...
{ "input": [ "6\n40", "101\n80", "3\n100" ], "output": [ "7.5000000", "63.7500000", "2.0000000" ] }
{ "input": [], "output": [] }
CORRECT
cpp
#include <iostream> #include <stdio.h> using namespace std; int x; double p; int main(void) { cin >> x >> p; p /= 100; double ans; if(x % 2 == 0){ ans = x/2/p; } else{ ans = p*(x-1)/2/p + (1-p)*(x+1)/2/p + 1; } printf("%.11f\n", ans); return 0; }
p03901 CODE FESTIVAL 2016 Elimination Tournament Round 2 (Parallel) - Takahashi is Missing!
Aoki is in search of Takahashi, who is missing in a one-dimentional world. Initially, the coordinate of Aoki is 0, and the coordinate of Takahashi is known to be x, but his coordinate afterwards cannot be known to Aoki. Time is divided into turns. In each turn, Aoki and Takahashi take the following actions simultaneou...
{ "input": [ "6\n40", "101\n80", "3\n100" ], "output": [ "7.5000000", "63.7500000", "2.0000000" ] }
{ "input": [], "output": [] }
CORRECT
cpp
#include<bits/stdc++.h> using namespace std; using Int = long long; struct Precision{ Precision(){ cout<<fixed<<setprecision(12); } }precision_beet; //INSERT ABOVE HERE signed main(){ int x; double p; cin>>x>>p; p/=100; double ans=(x&1); if(x&1){ ans+=p*(1/p)*(x-1)/2; ans+=(1.-p)*(1/p)*(x+...
p03901 CODE FESTIVAL 2016 Elimination Tournament Round 2 (Parallel) - Takahashi is Missing!
Aoki is in search of Takahashi, who is missing in a one-dimentional world. Initially, the coordinate of Aoki is 0, and the coordinate of Takahashi is known to be x, but his coordinate afterwards cannot be known to Aoki. Time is divided into turns. In each turn, Aoki and Takahashi take the following actions simultaneou...
{ "input": [ "6\n40", "101\n80", "3\n100" ], "output": [ "7.5000000", "63.7500000", "2.0000000" ] }
{ "input": [], "output": [] }
CORRECT
cpp
#include <vector> #include <iostream> #include <algorithm> #include <utility> #include <set> #include <map> #include <cmath> #include <iomanip> using namespace std; template<typename T, typename S> istream& operator >> (istream& is, pair<T, S>& p) { is >> p.first >> p.second; return is; } template<typename T...
p03901 CODE FESTIVAL 2016 Elimination Tournament Round 2 (Parallel) - Takahashi is Missing!
Aoki is in search of Takahashi, who is missing in a one-dimentional world. Initially, the coordinate of Aoki is 0, and the coordinate of Takahashi is known to be x, but his coordinate afterwards cannot be known to Aoki. Time is divided into turns. In each turn, Aoki and Takahashi take the following actions simultaneou...
{ "input": [ "6\n40", "101\n80", "3\n100" ], "output": [ "7.5000000", "63.7500000", "2.0000000" ] }
{ "input": [], "output": [] }
CORRECT
cpp
//xが偶数のとき, 移動方法が定まる(右に移動すればいい)ので簡単. //xが奇数のとき, 1ターン止まったあと, xが偶数のパターンになる。 //x-1, x+1どちらになっても(最適な)動き方は同じ・不完全情報ゲームより(?)、止まるタイミングは最初にして良いので簡単。 #include <iostream> #include <cstdio> using namespace std; int main() { int x, p; cin >> x >> p; double P = p * 0.01; if (x % 2 == 0) { printf("%.14f\n", x / (2 * P)); } ...
p03901 CODE FESTIVAL 2016 Elimination Tournament Round 2 (Parallel) - Takahashi is Missing!
Aoki is in search of Takahashi, who is missing in a one-dimentional world. Initially, the coordinate of Aoki is 0, and the coordinate of Takahashi is known to be x, but his coordinate afterwards cannot be known to Aoki. Time is divided into turns. In each turn, Aoki and Takahashi take the following actions simultaneou...
{ "input": [ "6\n40", "101\n80", "3\n100" ], "output": [ "7.5000000", "63.7500000", "2.0000000" ] }
{ "input": [], "output": [] }
CORRECT
cpp
#include <bits/stdc++.h> #include <sys/time.h> using namespace std; #define rep(i,n) for(long long i = 0; i < (long long)(n); i++) #define repi(i,a,b) for(long long i = (long long)(a); i < (long long)(b); i++) #define pb push_back #define all(x) (x).begin(), (x).end() #define fi first #define se second #define mt make...
p03901 CODE FESTIVAL 2016 Elimination Tournament Round 2 (Parallel) - Takahashi is Missing!
Aoki is in search of Takahashi, who is missing in a one-dimentional world. Initially, the coordinate of Aoki is 0, and the coordinate of Takahashi is known to be x, but his coordinate afterwards cannot be known to Aoki. Time is divided into turns. In each turn, Aoki and Takahashi take the following actions simultaneou...
{ "input": [ "6\n40", "101\n80", "3\n100" ], "output": [ "7.5000000", "63.7500000", "2.0000000" ] }
{ "input": [], "output": [] }
CORRECT
cpp
#include<iostream> #include<iomanip> using namespace std; int X; double p; double calc(int x) { return x/2/p; } int main() { cin>>X>>p;p/=100; double ans; if(X%2==0)ans=calc(X); else ans=p*calc(X-1)+(1-p)*calc(X+1)+1; cout<<fixed<<setprecision(16)<<ans<<endl; }
p03901 CODE FESTIVAL 2016 Elimination Tournament Round 2 (Parallel) - Takahashi is Missing!
Aoki is in search of Takahashi, who is missing in a one-dimentional world. Initially, the coordinate of Aoki is 0, and the coordinate of Takahashi is known to be x, but his coordinate afterwards cannot be known to Aoki. Time is divided into turns. In each turn, Aoki and Takahashi take the following actions simultaneou...
{ "input": [ "6\n40", "101\n80", "3\n100" ], "output": [ "7.5000000", "63.7500000", "2.0000000" ] }
{ "input": [], "output": [] }
CORRECT
cpp
#include <cstdlib> #include <cmath> #include <climits> #include <cfloat> #include <map> #include <set> #include <iostream> #include <string> #include <vector> #include <algorithm> #include <sstream> #include <complex> #include <stack> #include <queue> #include <cstdio> #include <cstring> #include <iterator> #include <b...
p03901 CODE FESTIVAL 2016 Elimination Tournament Round 2 (Parallel) - Takahashi is Missing!
Aoki is in search of Takahashi, who is missing in a one-dimentional world. Initially, the coordinate of Aoki is 0, and the coordinate of Takahashi is known to be x, but his coordinate afterwards cannot be known to Aoki. Time is divided into turns. In each turn, Aoki and Takahashi take the following actions simultaneou...
{ "input": [ "6\n40", "101\n80", "3\n100" ], "output": [ "7.5000000", "63.7500000", "2.0000000" ] }
{ "input": [], "output": [] }
CORRECT
cpp
#include <bits/stdc++.h> #include <assert.h> using namespace std; typedef long long ll; typedef long double ld; #define PB push_back #define MP make_pair #define MOD 1000000007LL #define endl "\n" const ll UNDEF = -1; const ll INF=1e18; template<typename T> inline bool chkmax(T &aa, T bb) { return aa < bb ? aa = bb, tr...
p03901 CODE FESTIVAL 2016 Elimination Tournament Round 2 (Parallel) - Takahashi is Missing!
Aoki is in search of Takahashi, who is missing in a one-dimentional world. Initially, the coordinate of Aoki is 0, and the coordinate of Takahashi is known to be x, but his coordinate afterwards cannot be known to Aoki. Time is divided into turns. In each turn, Aoki and Takahashi take the following actions simultaneou...
{ "input": [ "6\n40", "101\n80", "3\n100" ], "output": [ "7.5000000", "63.7500000", "2.0000000" ] }
{ "input": [], "output": [] }
CORRECT
cpp
#include <bits/stdc++.h> using namespace std; int main(){ long long X, P; cin >> X >> P; double ans; if(X % 2 == 0) ans = 50.0 * X / P; else ans = 50.0 * (X + 1.0) / P; cout.precision(15); cout << ans << endl; }
p03901 CODE FESTIVAL 2016 Elimination Tournament Round 2 (Parallel) - Takahashi is Missing!
Aoki is in search of Takahashi, who is missing in a one-dimentional world. Initially, the coordinate of Aoki is 0, and the coordinate of Takahashi is known to be x, but his coordinate afterwards cannot be known to Aoki. Time is divided into turns. In each turn, Aoki and Takahashi take the following actions simultaneou...
{ "input": [ "6\n40", "101\n80", "3\n100" ], "output": [ "7.5000000", "63.7500000", "2.0000000" ] }
{ "input": [], "output": [] }
CORRECT
cpp
#include<map> #include<set> #include<bitset> #include<cstdio> #include<iostream> #include<algorithm> #include<vector> #include<queue> #include<string> #include<chrono> #include<stack> #include<fstream> #include<list> #define REP(i,x,y) for(ll i=x;i<=y;i++) #define SIZE(a) ll(a.size()) #define vll vector<ll> #define ME...
p03901 CODE FESTIVAL 2016 Elimination Tournament Round 2 (Parallel) - Takahashi is Missing!
Aoki is in search of Takahashi, who is missing in a one-dimentional world. Initially, the coordinate of Aoki is 0, and the coordinate of Takahashi is known to be x, but his coordinate afterwards cannot be known to Aoki. Time is divided into turns. In each turn, Aoki and Takahashi take the following actions simultaneou...
{ "input": [ "6\n40", "101\n80", "3\n100" ], "output": [ "7.5000000", "63.7500000", "2.0000000" ] }
{ "input": [], "output": [] }
CORRECT
cpp
#include<iostream> #include<string> #include<queue> #include<algorithm> #include<map> #include<set> #include<vector> #include<math.h> #include<time.h> using namespace std; #define INF 1000000007 #define LINF (1LL << 62) typedef long long i64; typedef pair<i64,i64> P; i64 n, m; int main(){ cin >> n >> m; print...
p03901 CODE FESTIVAL 2016 Elimination Tournament Round 2 (Parallel) - Takahashi is Missing!
Aoki is in search of Takahashi, who is missing in a one-dimentional world. Initially, the coordinate of Aoki is 0, and the coordinate of Takahashi is known to be x, but his coordinate afterwards cannot be known to Aoki. Time is divided into turns. In each turn, Aoki and Takahashi take the following actions simultaneou...
{ "input": [ "6\n40", "101\n80", "3\n100" ], "output": [ "7.5000000", "63.7500000", "2.0000000" ] }
{ "input": [], "output": [] }
CORRECT
cpp
#include<bits/stdc++.h> using namespace std; int main(){ long long x,p;cin>>x>>p;x=(x+1)/2*100; cout<<fixed<<setprecision(6)<<x/(double)p<<endl; return 0; }
p03901 CODE FESTIVAL 2016 Elimination Tournament Round 2 (Parallel) - Takahashi is Missing!
Aoki is in search of Takahashi, who is missing in a one-dimentional world. Initially, the coordinate of Aoki is 0, and the coordinate of Takahashi is known to be x, but his coordinate afterwards cannot be known to Aoki. Time is divided into turns. In each turn, Aoki and Takahashi take the following actions simultaneou...
{ "input": [ "6\n40", "101\n80", "3\n100" ], "output": [ "7.5000000", "63.7500000", "2.0000000" ] }
{ "input": [], "output": [] }
CORRECT
cpp
#include <bits/stdc++.h> using namespace std; double solve(int x, double p) { if(x%2==1) return p*solve(x-1, p)+(1.0-p)*solve(x+1, p)+1.0; x/=2; return x/p; } int main() { int x, p; scanf("%d%d", &x, &p); printf("%.9f\n", solve(x, p/100.0)); return 0; }
p03901 CODE FESTIVAL 2016 Elimination Tournament Round 2 (Parallel) - Takahashi is Missing!
Aoki is in search of Takahashi, who is missing in a one-dimentional world. Initially, the coordinate of Aoki is 0, and the coordinate of Takahashi is known to be x, but his coordinate afterwards cannot be known to Aoki. Time is divided into turns. In each turn, Aoki and Takahashi take the following actions simultaneou...
{ "input": [ "6\n40", "101\n80", "3\n100" ], "output": [ "7.5000000", "63.7500000", "2.0000000" ] }
{ "input": [], "output": [] }
CORRECT
cpp
#include <cmath> #include <iostream> #include <vector> #include <queue> #include <deque> #include <map> #include <set> #include <stack> #include <tuple> #include <bitset> #include <algorithm> #include <functional> #include <utility> #include <iomanip> #define int long long int #define rep(i, n) for(int i = 0; i < (n);...
p03901 CODE FESTIVAL 2016 Elimination Tournament Round 2 (Parallel) - Takahashi is Missing!
Aoki is in search of Takahashi, who is missing in a one-dimentional world. Initially, the coordinate of Aoki is 0, and the coordinate of Takahashi is known to be x, but his coordinate afterwards cannot be known to Aoki. Time is divided into turns. In each turn, Aoki and Takahashi take the following actions simultaneou...
{ "input": [ "6\n40", "101\n80", "3\n100" ], "output": [ "7.5000000", "63.7500000", "2.0000000" ] }
{ "input": [], "output": [] }
CORRECT
cpp
#include<bits/stdc++.h> using namespace std; double X; double P; int main() { cin >> X >> P; printf("%lf\n" ,50.0 * (X + ((int)X % 2)) / P); return 0; }
p03901 CODE FESTIVAL 2016 Elimination Tournament Round 2 (Parallel) - Takahashi is Missing!
Aoki is in search of Takahashi, who is missing in a one-dimentional world. Initially, the coordinate of Aoki is 0, and the coordinate of Takahashi is known to be x, but his coordinate afterwards cannot be known to Aoki. Time is divided into turns. In each turn, Aoki and Takahashi take the following actions simultaneou...
{ "input": [ "6\n40", "101\n80", "3\n100" ], "output": [ "7.5000000", "63.7500000", "2.0000000" ] }
{ "input": [], "output": [] }
CORRECT
cpp
#include <bits/stdc++.h> using namespace std; int main(){ long long x; double p; cin>>x>>p; if(x%2){cout<<setprecision(20)<<(((double)x+1)/2)/p*100<<endl;} else{ cout<<setprecision(20)<<(((double)x)/2)/p*100<<endl;} }
p03901 CODE FESTIVAL 2016 Elimination Tournament Round 2 (Parallel) - Takahashi is Missing!
Aoki is in search of Takahashi, who is missing in a one-dimentional world. Initially, the coordinate of Aoki is 0, and the coordinate of Takahashi is known to be x, but his coordinate afterwards cannot be known to Aoki. Time is divided into turns. In each turn, Aoki and Takahashi take the following actions simultaneou...
{ "input": [ "6\n40", "101\n80", "3\n100" ], "output": [ "7.5000000", "63.7500000", "2.0000000" ] }
{ "input": [], "output": [] }
CORRECT
cpp
#include <bits/stdc++.h> using namespace std; #define rep(i,x,y) for(int i=(x);i<(y);++i) #define debug(x) #x << "=" << (x) #ifdef DEBUG #define _GLIBCXX_DEBUG #define print(x) std::cerr << debug(x) << " (L:" << __LINE__ << ")" << std::endl #else #define print(x) #endif const int inf=1e9; const int64_t inf64=1e18; c...
p03901 CODE FESTIVAL 2016 Elimination Tournament Round 2 (Parallel) - Takahashi is Missing!
Aoki is in search of Takahashi, who is missing in a one-dimentional world. Initially, the coordinate of Aoki is 0, and the coordinate of Takahashi is known to be x, but his coordinate afterwards cannot be known to Aoki. Time is divided into turns. In each turn, Aoki and Takahashi take the following actions simultaneou...
{ "input": [ "6\n40", "101\n80", "3\n100" ], "output": [ "7.5000000", "63.7500000", "2.0000000" ] }
{ "input": [], "output": [] }
CORRECT
cpp
#include <bits/stdc++.h> #define mp make_pair #define eb emplace_back #define ff first #define ss second using namespace std; typedef long long ll; typedef long double ld; #ifdef ONPC mt19937 rnd(228); #else mt19937 rnd(chrono::steady_clock::now().time_since_epoch().count()); #endif const int MAXN = 100; //#defin...
p03901 CODE FESTIVAL 2016 Elimination Tournament Round 2 (Parallel) - Takahashi is Missing!
Aoki is in search of Takahashi, who is missing in a one-dimentional world. Initially, the coordinate of Aoki is 0, and the coordinate of Takahashi is known to be x, but his coordinate afterwards cannot be known to Aoki. Time is divided into turns. In each turn, Aoki and Takahashi take the following actions simultaneou...
{ "input": [ "6\n40", "101\n80", "3\n100" ], "output": [ "7.5000000", "63.7500000", "2.0000000" ] }
{ "input": [], "output": [] }
CORRECT
cpp
#include<bits/stdc++.h> using namespace std; typedef long long LL; struct cww{cww(){ ios::sync_with_stdio(false);cin.tie(0); cout<<fixed; cout<<setprecision(10); }}star; #define fin "\n" #define FOR(i,bg,ed) for(int i=(bg);i<(ed);i++) #define REP(i,n) FOR(i,0,n) #define fi first #define se second #define p...
p03901 CODE FESTIVAL 2016 Elimination Tournament Round 2 (Parallel) - Takahashi is Missing!
Aoki is in search of Takahashi, who is missing in a one-dimentional world. Initially, the coordinate of Aoki is 0, and the coordinate of Takahashi is known to be x, but his coordinate afterwards cannot be known to Aoki. Time is divided into turns. In each turn, Aoki and Takahashi take the following actions simultaneou...
{ "input": [ "6\n40", "101\n80", "3\n100" ], "output": [ "7.5000000", "63.7500000", "2.0000000" ] }
{ "input": [], "output": [] }
CORRECT
cpp
#include<bits/stdc++.h> using namespace std; #define int long long #define rep(i,n) for(int i=0;i<(n);i++) #define pb push_back #define all(v) (v).begin(),(v).end() #define fi first #define se second typedef vector<int>vint; typedef pair<int,int>pint; typedef vector<pint>vpint; template<typename A,typename B>inline ...
p03901 CODE FESTIVAL 2016 Elimination Tournament Round 2 (Parallel) - Takahashi is Missing!
Aoki is in search of Takahashi, who is missing in a one-dimentional world. Initially, the coordinate of Aoki is 0, and the coordinate of Takahashi is known to be x, but his coordinate afterwards cannot be known to Aoki. Time is divided into turns. In each turn, Aoki and Takahashi take the following actions simultaneou...
{ "input": [ "6\n40", "101\n80", "3\n100" ], "output": [ "7.5000000", "63.7500000", "2.0000000" ] }
{ "input": [], "output": [] }
CORRECT
cpp
#include<iostream> #include<algorithm> #include<vector> #include<queue> #include<iomanip> #define lol(i,n) for(int i=0;i<n;i++) #define mod 1000000007 typedef long long ll; using namespace std; int main(){ ll x,p;cin>>x>>p; cout<<fixed<<setprecision(10)<<(x+1)/2*100/(double)p<<endl; return 0; }
p03901 CODE FESTIVAL 2016 Elimination Tournament Round 2 (Parallel) - Takahashi is Missing!
Aoki is in search of Takahashi, who is missing in a one-dimentional world. Initially, the coordinate of Aoki is 0, and the coordinate of Takahashi is known to be x, but his coordinate afterwards cannot be known to Aoki. Time is divided into turns. In each turn, Aoki and Takahashi take the following actions simultaneou...
{ "input": [ "6\n40", "101\n80", "3\n100" ], "output": [ "7.5000000", "63.7500000", "2.0000000" ] }
{ "input": [], "output": [] }
CORRECT
cpp
#include <bits/stdc++.h> using namespace std; int main(){ int x; double p; cin >> x >> p; p /= 100.0; if(x % 2) { x /= 2; printf("%.9lf\n",x + (x + 1) / p * (1 - p) + 1); } else printf("%.9lf\n",x / 2 / p); return 0; }
p03901 CODE FESTIVAL 2016 Elimination Tournament Round 2 (Parallel) - Takahashi is Missing!
Aoki is in search of Takahashi, who is missing in a one-dimentional world. Initially, the coordinate of Aoki is 0, and the coordinate of Takahashi is known to be x, but his coordinate afterwards cannot be known to Aoki. Time is divided into turns. In each turn, Aoki and Takahashi take the following actions simultaneou...
{ "input": [ "6\n40", "101\n80", "3\n100" ], "output": [ "7.5000000", "63.7500000", "2.0000000" ] }
{ "input": [], "output": [] }
CORRECT
java
// package atcoder.other2016.codefestival2016.round2; import java.io.IOException; import java.io.InputStream; import java.io.PrintWriter; import java.util.Arrays; import java.util.InputMismatchException; public class Main { public static void main(String[] args) { InputReader in = new InputReader(System.i...
p03901 CODE FESTIVAL 2016 Elimination Tournament Round 2 (Parallel) - Takahashi is Missing!
Aoki is in search of Takahashi, who is missing in a one-dimentional world. Initially, the coordinate of Aoki is 0, and the coordinate of Takahashi is known to be x, but his coordinate afterwards cannot be known to Aoki. Time is divided into turns. In each turn, Aoki and Takahashi take the following actions simultaneou...
{ "input": [ "6\n40", "101\n80", "3\n100" ], "output": [ "7.5000000", "63.7500000", "2.0000000" ] }
{ "input": [], "output": [] }
CORRECT
cpp
#include <bits/stdc++.h> #define all(vec) vec.begin(),vec.end() #define mp make_pair using namespace std; using ll=long long; using P=pair<ll,ll>; const ll INF=1LL<<30; const ll LINF=1LL<<62; const double eps=1e-9; const ll MOD=1000000007LL; template<typename T>void chmin(T &a,T b){a=min(a,b);}; template<typename T>voi...
p03901 CODE FESTIVAL 2016 Elimination Tournament Round 2 (Parallel) - Takahashi is Missing!
Aoki is in search of Takahashi, who is missing in a one-dimentional world. Initially, the coordinate of Aoki is 0, and the coordinate of Takahashi is known to be x, but his coordinate afterwards cannot be known to Aoki. Time is divided into turns. In each turn, Aoki and Takahashi take the following actions simultaneou...
{ "input": [ "6\n40", "101\n80", "3\n100" ], "output": [ "7.5000000", "63.7500000", "2.0000000" ] }
{ "input": [], "output": [] }
CORRECT
cpp
#include <bits/stdc++.h> #define pb push_back #define mp make_pair #define all(x) (x).begin(), (x).end() #define sz(x) (int)((x).size()) #define jonathan ios_base::sync_with_stdio(0) #define livingston cin.tie(0) using namespace std; ...
p03901 CODE FESTIVAL 2016 Elimination Tournament Round 2 (Parallel) - Takahashi is Missing!
Aoki is in search of Takahashi, who is missing in a one-dimentional world. Initially, the coordinate of Aoki is 0, and the coordinate of Takahashi is known to be x, but his coordinate afterwards cannot be known to Aoki. Time is divided into turns. In each turn, Aoki and Takahashi take the following actions simultaneou...
{ "input": [ "6\n40", "101\n80", "3\n100" ], "output": [ "7.5000000", "63.7500000", "2.0000000" ] }
{ "input": [], "output": [] }
CORRECT
cpp
#include <iostream> #include <iomanip> #include <algorithm> #include <bitset> #include <set> #include <unordered_set> #include <map> #include <unordered_map> #include <cmath> #include <time.h> #include <random> #include <string> #include <cassert> #include <vector> #include <ostream> #include <istream> #include <stack>...
p03901 CODE FESTIVAL 2016 Elimination Tournament Round 2 (Parallel) - Takahashi is Missing!
Aoki is in search of Takahashi, who is missing in a one-dimentional world. Initially, the coordinate of Aoki is 0, and the coordinate of Takahashi is known to be x, but his coordinate afterwards cannot be known to Aoki. Time is divided into turns. In each turn, Aoki and Takahashi take the following actions simultaneou...
{ "input": [ "6\n40", "101\n80", "3\n100" ], "output": [ "7.5000000", "63.7500000", "2.0000000" ] }
{ "input": [], "output": [] }
CORRECT
java
import java.io.*; import java.math.*; import java.util.*; import static java.util.Arrays.*; public class Main { private static final int mod = (int)1e9+7; final Random random = new Random(0); final IOFast io = new IOFast(); /// MAIN CODE public void run() throws IOException { // int TEST_CASE = Integer.parse...
p03901 CODE FESTIVAL 2016 Elimination Tournament Round 2 (Parallel) - Takahashi is Missing!
Aoki is in search of Takahashi, who is missing in a one-dimentional world. Initially, the coordinate of Aoki is 0, and the coordinate of Takahashi is known to be x, but his coordinate afterwards cannot be known to Aoki. Time is divided into turns. In each turn, Aoki and Takahashi take the following actions simultaneou...
{ "input": [ "6\n40", "101\n80", "3\n100" ], "output": [ "7.5000000", "63.7500000", "2.0000000" ] }
{ "input": [], "output": [] }
CORRECT
java
import java.io.ByteArrayInputStream; import java.io.IOException; import java.io.InputStream; import java.io.PrintWriter; import java.util.Arrays; import java.util.InputMismatchException; public class Main { static InputStream is; static PrintWriter out; static String INPUT = ""; static void solve() { int x = ...
p03901 CODE FESTIVAL 2016 Elimination Tournament Round 2 (Parallel) - Takahashi is Missing!
Aoki is in search of Takahashi, who is missing in a one-dimentional world. Initially, the coordinate of Aoki is 0, and the coordinate of Takahashi is known to be x, but his coordinate afterwards cannot be known to Aoki. Time is divided into turns. In each turn, Aoki and Takahashi take the following actions simultaneou...
{ "input": [ "6\n40", "101\n80", "3\n100" ], "output": [ "7.5000000", "63.7500000", "2.0000000" ] }
{ "input": [], "output": [] }
CORRECT
cpp
#include <algorithm> #include <cassert> #include <cctype> #include <climits> #include <cmath> #include <complex> #include <cstdio> #include <cstring> #include <deque> #include <functional> #include <iomanip> #include <iostream> #include <map> #include <numeric> #include <queue> #include <random> #include <set> #include...
p03901 CODE FESTIVAL 2016 Elimination Tournament Round 2 (Parallel) - Takahashi is Missing!
Aoki is in search of Takahashi, who is missing in a one-dimentional world. Initially, the coordinate of Aoki is 0, and the coordinate of Takahashi is known to be x, but his coordinate afterwards cannot be known to Aoki. Time is divided into turns. In each turn, Aoki and Takahashi take the following actions simultaneou...
{ "input": [ "6\n40", "101\n80", "3\n100" ], "output": [ "7.5000000", "63.7500000", "2.0000000" ] }
{ "input": [], "output": [] }
CORRECT
cpp
#include<cstdio> #include<iostream> #include<vector> #include<string> #include<algorithm> #include<queue> #include<stack> #include<map> #include<set> #include<iomanip> #define rep0(i,N) for(int i=0;i<N;i++) #define rep1(i,a,N) for(int i=0+a;i<N;i++) #define lint long long int #define SIZE 100005 using namespace std; ...
p03901 CODE FESTIVAL 2016 Elimination Tournament Round 2 (Parallel) - Takahashi is Missing!
Aoki is in search of Takahashi, who is missing in a one-dimentional world. Initially, the coordinate of Aoki is 0, and the coordinate of Takahashi is known to be x, but his coordinate afterwards cannot be known to Aoki. Time is divided into turns. In each turn, Aoki and Takahashi take the following actions simultaneou...
{ "input": [ "6\n40", "101\n80", "3\n100" ], "output": [ "7.5000000", "63.7500000", "2.0000000" ] }
{ "input": [], "output": [] }
CORRECT
cpp
// #include {{{ #include <iostream> #include <cassert> #include <cstring> #include <cstdlib> #include <cstdio> #include <cctype> #include <cmath> #include <ctime> #include <queue> #include <set> #include <map> #include <stack> #include <string> #include <bitset> #include <vector> #include <complex> #include <algorithm>...
p03901 CODE FESTIVAL 2016 Elimination Tournament Round 2 (Parallel) - Takahashi is Missing!
Aoki is in search of Takahashi, who is missing in a one-dimentional world. Initially, the coordinate of Aoki is 0, and the coordinate of Takahashi is known to be x, but his coordinate afterwards cannot be known to Aoki. Time is divided into turns. In each turn, Aoki and Takahashi take the following actions simultaneou...
{ "input": [ "6\n40", "101\n80", "3\n100" ], "output": [ "7.5000000", "63.7500000", "2.0000000" ] }
{ "input": [], "output": [] }
CORRECT
cpp
#include <iostream> #include <vector> #include <string> #include <cmath> #include <algorithm> #include <utility> #include <queue> #include <set> #include <map> #include <deque> #include <iomanip> #include <cstdio> using namespace std; typedef long long ll; typedef pair<int,int> PII; typedef vector<int> VI; typedef ve...
p03901 CODE FESTIVAL 2016 Elimination Tournament Round 2 (Parallel) - Takahashi is Missing!
Aoki is in search of Takahashi, who is missing in a one-dimentional world. Initially, the coordinate of Aoki is 0, and the coordinate of Takahashi is known to be x, but his coordinate afterwards cannot be known to Aoki. Time is divided into turns. In each turn, Aoki and Takahashi take the following actions simultaneou...
{ "input": [ "6\n40", "101\n80", "3\n100" ], "output": [ "7.5000000", "63.7500000", "2.0000000" ] }
{ "input": [], "output": [] }
CORRECT
python3
x = int(input()) p = int(input()) print("%.016f\n" % ((((x+(x%2))/2)*100/p)))
p03901 CODE FESTIVAL 2016 Elimination Tournament Round 2 (Parallel) - Takahashi is Missing!
Aoki is in search of Takahashi, who is missing in a one-dimentional world. Initially, the coordinate of Aoki is 0, and the coordinate of Takahashi is known to be x, but his coordinate afterwards cannot be known to Aoki. Time is divided into turns. In each turn, Aoki and Takahashi take the following actions simultaneou...
{ "input": [ "6\n40", "101\n80", "3\n100" ], "output": [ "7.5000000", "63.7500000", "2.0000000" ] }
{ "input": [], "output": [] }
CORRECT
cpp
# include "bits/stdc++.h" using namespace std; using LL = long long; using ULL = unsigned long long; const double PI = acos(-1); template<class T>constexpr T INF() { return ::std::numeric_limits<T>::max(); } template<class T>constexpr T HINF() { return INF<T>() / 2; } template <typename T_char>T_char TL(T_char cX) { re...
p03901 CODE FESTIVAL 2016 Elimination Tournament Round 2 (Parallel) - Takahashi is Missing!
Aoki is in search of Takahashi, who is missing in a one-dimentional world. Initially, the coordinate of Aoki is 0, and the coordinate of Takahashi is known to be x, but his coordinate afterwards cannot be known to Aoki. Time is divided into turns. In each turn, Aoki and Takahashi take the following actions simultaneou...
{ "input": [ "6\n40", "101\n80", "3\n100" ], "output": [ "7.5000000", "63.7500000", "2.0000000" ] }
{ "input": [], "output": [] }
CORRECT
cpp
#include <bits/stdc++.h> #include <random> using namespace std; typedef unsigned long long ull; typedef long long ll; typedef long double ld; #define int ll typedef vector<char> vc; typedef vector<vc> vvc; typedef vector<vvc> vvvc; typedef pair<int, int> pii; typedef pair<pii, pii> piii; typedef pair<ll, ll> pll; typ...
p03901 CODE FESTIVAL 2016 Elimination Tournament Round 2 (Parallel) - Takahashi is Missing!
Aoki is in search of Takahashi, who is missing in a one-dimentional world. Initially, the coordinate of Aoki is 0, and the coordinate of Takahashi is known to be x, but his coordinate afterwards cannot be known to Aoki. Time is divided into turns. In each turn, Aoki and Takahashi take the following actions simultaneou...
{ "input": [ "6\n40", "101\n80", "3\n100" ], "output": [ "7.5000000", "63.7500000", "2.0000000" ] }
{ "input": [], "output": [] }
CORRECT
cpp
#include<bits/stdc++.h> using namespace std; int main(){ long x,p;cin>>x>>p; cout<<fixed<<setprecision(10)<<50.0*(x+x%2)/p; }
p03901 CODE FESTIVAL 2016 Elimination Tournament Round 2 (Parallel) - Takahashi is Missing!
Aoki is in search of Takahashi, who is missing in a one-dimentional world. Initially, the coordinate of Aoki is 0, and the coordinate of Takahashi is known to be x, but his coordinate afterwards cannot be known to Aoki. Time is divided into turns. In each turn, Aoki and Takahashi take the following actions simultaneou...
{ "input": [ "6\n40", "101\n80", "3\n100" ], "output": [ "7.5000000", "63.7500000", "2.0000000" ] }
{ "input": [], "output": [] }
CORRECT
cpp
#include <iostream> #include <algorithm> #include <vector> #include <iomanip> #include <map> #include <queue> static const int MOD = 1000000007; using ll = long long; using u32 = unsigned; using namespace std; template<class T> constexpr T INF = ::numeric_limits<T>::max() / 32 * 15 + 208; int main() { ll x, p; ...
p03901 CODE FESTIVAL 2016 Elimination Tournament Round 2 (Parallel) - Takahashi is Missing!
Aoki is in search of Takahashi, who is missing in a one-dimentional world. Initially, the coordinate of Aoki is 0, and the coordinate of Takahashi is known to be x, but his coordinate afterwards cannot be known to Aoki. Time is divided into turns. In each turn, Aoki and Takahashi take the following actions simultaneou...
{ "input": [ "6\n40", "101\n80", "3\n100" ], "output": [ "7.5000000", "63.7500000", "2.0000000" ] }
{ "input": [], "output": [] }
CORRECT
cpp
#include <bits/stdc++.h> using namespace std; int main() { int X, P; cin >> X >> P; int a = (X + 1) / 2; double p = P / 100.0; cout << fixed << setprecision(9) << 1 / p * a << endl; return 0; }
p03901 CODE FESTIVAL 2016 Elimination Tournament Round 2 (Parallel) - Takahashi is Missing!
Aoki is in search of Takahashi, who is missing in a one-dimentional world. Initially, the coordinate of Aoki is 0, and the coordinate of Takahashi is known to be x, but his coordinate afterwards cannot be known to Aoki. Time is divided into turns. In each turn, Aoki and Takahashi take the following actions simultaneou...
{ "input": [ "6\n40", "101\n80", "3\n100" ], "output": [ "7.5000000", "63.7500000", "2.0000000" ] }
{ "input": [], "output": [] }
CORRECT
python3
x=int(input()) p=int(input())/100 print((x+1)//2 * 1 / p)
p03901 CODE FESTIVAL 2016 Elimination Tournament Round 2 (Parallel) - Takahashi is Missing!
Aoki is in search of Takahashi, who is missing in a one-dimentional world. Initially, the coordinate of Aoki is 0, and the coordinate of Takahashi is known to be x, but his coordinate afterwards cannot be known to Aoki. Time is divided into turns. In each turn, Aoki and Takahashi take the following actions simultaneou...
{ "input": [ "6\n40", "101\n80", "3\n100" ], "output": [ "7.5000000", "63.7500000", "2.0000000" ] }
{ "input": [], "output": [] }
CORRECT
cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; #define rep(i,a) for(int i=0;i<(a);i++) const ll MOD=1000000007; // 1ターン分プラスして, // dp_x=1+dp_(x-2)*P/100+dp_x*(100-p)/100 // dp_x=dp_(x-2)+100/p int main(){ ll x; cin>>x; double p; cin>>p; if(x%2) x++; cout<<setprecision(15); cout<<x/2*100/...
p03901 CODE FESTIVAL 2016 Elimination Tournament Round 2 (Parallel) - Takahashi is Missing!
Aoki is in search of Takahashi, who is missing in a one-dimentional world. Initially, the coordinate of Aoki is 0, and the coordinate of Takahashi is known to be x, but his coordinate afterwards cannot be known to Aoki. Time is divided into turns. In each turn, Aoki and Takahashi take the following actions simultaneou...
{ "input": [ "6\n40", "101\n80", "3\n100" ], "output": [ "7.5000000", "63.7500000", "2.0000000" ] }
{ "input": [], "output": [] }
CORRECT
cpp
#include <cstdio> #include <algorithm> #include <cmath> #include <queue> #include <vector> #include <map> #include <set> using namespace std; typedef pair<int , int> P2; typedef pair<pair<int , int> , int> P3; typedef pair<pair<int , int> , pair<int , int> > P4; #define Fst first #define Snd second #define PB(a) push...
p03901 CODE FESTIVAL 2016 Elimination Tournament Round 2 (Parallel) - Takahashi is Missing!
Aoki is in search of Takahashi, who is missing in a one-dimentional world. Initially, the coordinate of Aoki is 0, and the coordinate of Takahashi is known to be x, but his coordinate afterwards cannot be known to Aoki. Time is divided into turns. In each turn, Aoki and Takahashi take the following actions simultaneou...
{ "input": [ "6\n40", "101\n80", "3\n100" ], "output": [ "7.5000000", "63.7500000", "2.0000000" ] }
{ "input": [], "output": [] }
CORRECT
cpp
#include<bits/stdc++.h> using namespace std; typedef long long ll; signed main(){ ios::sync_with_stdio(false); cin.tie(0); cout << fixed << setprecision(20); ll x; cin>>x; double p; cin>>p; if(abs(p-100)<0.01){ x++; cout << x/2 << endl; return 0; } ...
p03901 CODE FESTIVAL 2016 Elimination Tournament Round 2 (Parallel) - Takahashi is Missing!
Aoki is in search of Takahashi, who is missing in a one-dimentional world. Initially, the coordinate of Aoki is 0, and the coordinate of Takahashi is known to be x, but his coordinate afterwards cannot be known to Aoki. Time is divided into turns. In each turn, Aoki and Takahashi take the following actions simultaneou...
{ "input": [ "6\n40", "101\n80", "3\n100" ], "output": [ "7.5000000", "63.7500000", "2.0000000" ] }
{ "input": [], "output": [] }
CORRECT
cpp
#include<stdio.h> #include<vector> #include<algorithm> using namespace std; int main() { int num,pr; scanf("%d%d",&num,&pr); if(num%2==1)num++; printf("%lf\n",(double)num/(1.0-double(100-pr)/double(100)+double(pr)/double(100))); }
p03901 CODE FESTIVAL 2016 Elimination Tournament Round 2 (Parallel) - Takahashi is Missing!
Aoki is in search of Takahashi, who is missing in a one-dimentional world. Initially, the coordinate of Aoki is 0, and the coordinate of Takahashi is known to be x, but his coordinate afterwards cannot be known to Aoki. Time is divided into turns. In each turn, Aoki and Takahashi take the following actions simultaneou...
{ "input": [ "6\n40", "101\n80", "3\n100" ], "output": [ "7.5000000", "63.7500000", "2.0000000" ] }
{ "input": [], "output": [] }
CORRECT
cpp
#include "bits/stdc++.h" #include <unordered_set> #define _CRT_SECURE_NO_WARNINGS #define FOR(i, x, n) for(decltype(x) i = (x); i < (n); i++) #define REP(i, n) for(decltype(n) i = 0; i < (n); i++) #define RREP(i, n) for (decltype(n) i = (n) - 1; i >= 0; i--) #define ALL(a) (a).begin(),(a).end() #define SORT(c) sort(...
p03901 CODE FESTIVAL 2016 Elimination Tournament Round 2 (Parallel) - Takahashi is Missing!
Aoki is in search of Takahashi, who is missing in a one-dimentional world. Initially, the coordinate of Aoki is 0, and the coordinate of Takahashi is known to be x, but his coordinate afterwards cannot be known to Aoki. Time is divided into turns. In each turn, Aoki and Takahashi take the following actions simultaneou...
{ "input": [ "6\n40", "101\n80", "3\n100" ], "output": [ "7.5000000", "63.7500000", "2.0000000" ] }
{ "input": [], "output": [] }
CORRECT
cpp
#include <bits/stdc++.h> #include <random> using namespace std; typedef unsigned long long ull; typedef long long ll; typedef double ld; //#define ll __int128 //#define int ll //#define char ll //#define double ld typedef vector<char> vc; typedef vector <vc> vvc; typedef vector <vvc> vvvc; typedef pair<int, int> pii;...
p03901 CODE FESTIVAL 2016 Elimination Tournament Round 2 (Parallel) - Takahashi is Missing!
Aoki is in search of Takahashi, who is missing in a one-dimentional world. Initially, the coordinate of Aoki is 0, and the coordinate of Takahashi is known to be x, but his coordinate afterwards cannot be known to Aoki. Time is divided into turns. In each turn, Aoki and Takahashi take the following actions simultaneou...
{ "input": [ "6\n40", "101\n80", "3\n100" ], "output": [ "7.5000000", "63.7500000", "2.0000000" ] }
{ "input": [], "output": [] }
CORRECT
cpp
#include <bits/stdc++.h> using namespace std; int main(){ int x, p; cin >> x >> p; x = (x + 1) / 2; cout << fixed << setprecision(12) << 100. / p * x << endl; return 0; }
p03901 CODE FESTIVAL 2016 Elimination Tournament Round 2 (Parallel) - Takahashi is Missing!
Aoki is in search of Takahashi, who is missing in a one-dimentional world. Initially, the coordinate of Aoki is 0, and the coordinate of Takahashi is known to be x, but his coordinate afterwards cannot be known to Aoki. Time is divided into turns. In each turn, Aoki and Takahashi take the following actions simultaneou...
{ "input": [ "6\n40", "101\n80", "3\n100" ], "output": [ "7.5000000", "63.7500000", "2.0000000" ] }
{ "input": [], "output": [] }
CORRECT
cpp
#include <iostream> #include <fstream> #include <cstdio> #include <cmath> #include <vector> #include <cstring> #include <string> #include <set> #include <map> #include <stack> #include <queue> #include <algorithm> using namespace std; #define REP(i,n) for(int i=0; i<n; ++i) #define FOR(i,a,b) for(int i=a; i<=b; ++i) ...
p03901 CODE FESTIVAL 2016 Elimination Tournament Round 2 (Parallel) - Takahashi is Missing!
Aoki is in search of Takahashi, who is missing in a one-dimentional world. Initially, the coordinate of Aoki is 0, and the coordinate of Takahashi is known to be x, but his coordinate afterwards cannot be known to Aoki. Time is divided into turns. In each turn, Aoki and Takahashi take the following actions simultaneou...
{ "input": [ "6\n40", "101\n80", "3\n100" ], "output": [ "7.5000000", "63.7500000", "2.0000000" ] }
{ "input": [], "output": [] }
CORRECT
cpp
#include <string> #include <queue> #include <stack> #include <vector> #include <sstream> #include <algorithm> #include <deque> #include <set> #include <map> #include <unordered_set> #include <unordered_map> #include <list> #include <cstdio> #include <iostream> #include <cmath> #include <climits> #include <bitset> #incl...
p03901 CODE FESTIVAL 2016 Elimination Tournament Round 2 (Parallel) - Takahashi is Missing!
Aoki is in search of Takahashi, who is missing in a one-dimentional world. Initially, the coordinate of Aoki is 0, and the coordinate of Takahashi is known to be x, but his coordinate afterwards cannot be known to Aoki. Time is divided into turns. In each turn, Aoki and Takahashi take the following actions simultaneou...
{ "input": [ "6\n40", "101\n80", "3\n100" ], "output": [ "7.5000000", "63.7500000", "2.0000000" ] }
{ "input": [], "output": [] }
CORRECT
cpp
#include <bits/stdc++.h> #include<iostream> #include<cstdio> #include<vector> #include<queue> #include<m...
p03901 CODE FESTIVAL 2016 Elimination Tournament Round 2 (Parallel) - Takahashi is Missing!
Aoki is in search of Takahashi, who is missing in a one-dimentional world. Initially, the coordinate of Aoki is 0, and the coordinate of Takahashi is known to be x, but his coordinate afterwards cannot be known to Aoki. Time is divided into turns. In each turn, Aoki and Takahashi take the following actions simultaneou...
{ "input": [ "6\n40", "101\n80", "3\n100" ], "output": [ "7.5000000", "63.7500000", "2.0000000" ] }
{ "input": [], "output": [] }
CORRECT
cpp
#include<bits/stdc++.h> using namespace std; int main () { long long x,p; double ans; cin >> x >> p; if (x % 2 == 0) { x /= 2; ans = x; ans *= 100; ans /= p; } else { x /= 2; ans = x*p + (x+1)*(100-p); ans /= p; ans += 1; } cout << fixed << setprecision(10) << ans << ...
p03901 CODE FESTIVAL 2016 Elimination Tournament Round 2 (Parallel) - Takahashi is Missing!
Aoki is in search of Takahashi, who is missing in a one-dimentional world. Initially, the coordinate of Aoki is 0, and the coordinate of Takahashi is known to be x, but his coordinate afterwards cannot be known to Aoki. Time is divided into turns. In each turn, Aoki and Takahashi take the following actions simultaneou...
{ "input": [ "6\n40", "101\n80", "3\n100" ], "output": [ "7.5000000", "63.7500000", "2.0000000" ] }
{ "input": [], "output": [] }
CORRECT
cpp
#include<bits/stdc++.h> using namespace std; typedef long long ll; int main(){ double x,p;cin>>x>>p; int y=x; double iti=(100-2*p)/(double)100; if((int)y%2==1)x+=iti; double ans=x/(1-iti); if((int)y%2==1){ ans+=1.0; } cout<<fixed<<setprecision(12)<<ans<<endl; }
p03901 CODE FESTIVAL 2016 Elimination Tournament Round 2 (Parallel) - Takahashi is Missing!
Aoki is in search of Takahashi, who is missing in a one-dimentional world. Initially, the coordinate of Aoki is 0, and the coordinate of Takahashi is known to be x, but his coordinate afterwards cannot be known to Aoki. Time is divided into turns. In each turn, Aoki and Takahashi take the following actions simultaneou...
{ "input": [ "6\n40", "101\n80", "3\n100" ], "output": [ "7.5000000", "63.7500000", "2.0000000" ] }
{ "input": [], "output": [] }
CORRECT
cpp
#define _USE_MATH_DEFINES #include "bits/stdc++.h" using namespace std; #define FOR(i,j,k) for(int (i)=(j);(i)<(int)(k);++(i)) #define rep(i,j) FOR(i,0,j) #define each(x,y) for(auto &(x):(y)) #define mp make_pair #define MT make_tuple #define all(x) (x).begin(),(x).end() #define debug(x) cout<<#x<<": "<<(x)<<endl #defi...
p03901 CODE FESTIVAL 2016 Elimination Tournament Round 2 (Parallel) - Takahashi is Missing!
Aoki is in search of Takahashi, who is missing in a one-dimentional world. Initially, the coordinate of Aoki is 0, and the coordinate of Takahashi is known to be x, but his coordinate afterwards cannot be known to Aoki. Time is divided into turns. In each turn, Aoki and Takahashi take the following actions simultaneou...
{ "input": [ "6\n40", "101\n80", "3\n100" ], "output": [ "7.5000000", "63.7500000", "2.0000000" ] }
{ "input": [], "output": [] }
CORRECT
python3
N = int(input()) M = int(input()) if N%2: print(1 + (N-1) / 2 + (100 - M) * (N+1) /2 / M) else: print(N * 50 / M)
p03901 CODE FESTIVAL 2016 Elimination Tournament Round 2 (Parallel) - Takahashi is Missing!
Aoki is in search of Takahashi, who is missing in a one-dimentional world. Initially, the coordinate of Aoki is 0, and the coordinate of Takahashi is known to be x, but his coordinate afterwards cannot be known to Aoki. Time is divided into turns. In each turn, Aoki and Takahashi take the following actions simultaneou...
{ "input": [ "6\n40", "101\n80", "3\n100" ], "output": [ "7.5000000", "63.7500000", "2.0000000" ] }
{ "input": [], "output": [] }
CORRECT
cpp
#include <bits/stdc++.h> using namespace std; #define INF_LL (int64)1e18 #define INF (int32)1e9 #define REP(i, n) for(int i = 0;i < (n);i++) #define FOR(i, a, b) for(int i = (a);i < (b);i++) #define all(x) x.begin(),x.end() #define fs first #define sc second using int32 = int_fast32_t; using uint32 = uint_fast32_t; u...
p03901 CODE FESTIVAL 2016 Elimination Tournament Round 2 (Parallel) - Takahashi is Missing!
Aoki is in search of Takahashi, who is missing in a one-dimentional world. Initially, the coordinate of Aoki is 0, and the coordinate of Takahashi is known to be x, but his coordinate afterwards cannot be known to Aoki. Time is divided into turns. In each turn, Aoki and Takahashi take the following actions simultaneou...
{ "input": [ "6\n40", "101\n80", "3\n100" ], "output": [ "7.5000000", "63.7500000", "2.0000000" ] }
{ "input": [], "output": [] }
IN-CORRECT
cpp
#include <bits/stdc++.h> using namespace std; signed main() { ios::sync_with_stdio(false); cin.tie(0); cout << fixed << setprecision(20); long long x; cin >> x; double p; cin >> p; if (p == 100) { cout << x / 2 << endl; return 0; } p /= 100.0; if (x % 2 == 0) { cout << x / 2.0 / p << "...
p03901 CODE FESTIVAL 2016 Elimination Tournament Round 2 (Parallel) - Takahashi is Missing!
Aoki is in search of Takahashi, who is missing in a one-dimentional world. Initially, the coordinate of Aoki is 0, and the coordinate of Takahashi is known to be x, but his coordinate afterwards cannot be known to Aoki. Time is divided into turns. In each turn, Aoki and Takahashi take the following actions simultaneou...
{ "input": [ "6\n40", "101\n80", "3\n100" ], "output": [ "7.5000000", "63.7500000", "2.0000000" ] }
{ "input": [], "output": [] }
IN-CORRECT
cpp
#include <bits/stdc++.h> using namespace std; int x, p; int main() { cin >> x >> p; cout << x / 2 + 1 << endl; return (0); }
p03901 CODE FESTIVAL 2016 Elimination Tournament Round 2 (Parallel) - Takahashi is Missing!
Aoki is in search of Takahashi, who is missing in a one-dimentional world. Initially, the coordinate of Aoki is 0, and the coordinate of Takahashi is known to be x, but his coordinate afterwards cannot be known to Aoki. Time is divided into turns. In each turn, Aoki and Takahashi take the following actions simultaneou...
{ "input": [ "6\n40", "101\n80", "3\n100" ], "output": [ "7.5000000", "63.7500000", "2.0000000" ] }
{ "input": [], "output": [] }
IN-CORRECT
cpp
#include <bits/stdc++.h> using namespace std; const long long MOD = 1000000007; const int INF = 1 << 29; const double EPS = 1e-8; int main() { long long x, p; cin >> x >> p; cout << (x + 1) / 2 << endl; return 0; }
p03901 CODE FESTIVAL 2016 Elimination Tournament Round 2 (Parallel) - Takahashi is Missing!
Aoki is in search of Takahashi, who is missing in a one-dimentional world. Initially, the coordinate of Aoki is 0, and the coordinate of Takahashi is known to be x, but his coordinate afterwards cannot be known to Aoki. Time is divided into turns. In each turn, Aoki and Takahashi take the following actions simultaneou...
{ "input": [ "6\n40", "101\n80", "3\n100" ], "output": [ "7.5000000", "63.7500000", "2.0000000" ] }
{ "input": [], "output": [] }
IN-CORRECT
cpp
#include <bits/stdc++.h> #define mp make_pair #define mt make_tuple #define rep(i,n) for(int i=0;i<(n);i++) using namespace std; using ll = long long; using ull = unsigned long long; using pii = pair<int, int>; using double = long double; const int INF=1<<29; const double EPS=1e-9; const ll MOD = 1000000...
p03901 CODE FESTIVAL 2016 Elimination Tournament Round 2 (Parallel) - Takahashi is Missing!
Aoki is in search of Takahashi, who is missing in a one-dimentional world. Initially, the coordinate of Aoki is 0, and the coordinate of Takahashi is known to be x, but his coordinate afterwards cannot be known to Aoki. Time is divided into turns. In each turn, Aoki and Takahashi take the following actions simultaneou...
{ "input": [ "6\n40", "101\n80", "3\n100" ], "output": [ "7.5000000", "63.7500000", "2.0000000" ] }
{ "input": [], "output": [] }
IN-CORRECT
python3
sx = input() sp = input() x = int(sx) p = int(sp) ret = 0 e = 0 cnt = x % 2 if p == 100: ret = int(x / 2) + cnt print(ret)
p03901 CODE FESTIVAL 2016 Elimination Tournament Round 2 (Parallel) - Takahashi is Missing!
Aoki is in search of Takahashi, who is missing in a one-dimentional world. Initially, the coordinate of Aoki is 0, and the coordinate of Takahashi is known to be x, but his coordinate afterwards cannot be known to Aoki. Time is divided into turns. In each turn, Aoki and Takahashi take the following actions simultaneou...
{ "input": [ "6\n40", "101\n80", "3\n100" ], "output": [ "7.5000000", "63.7500000", "2.0000000" ] }
{ "input": [], "output": [] }
IN-CORRECT
cpp
#include <bits/stdc++.h> using namespace std; using ll = long long; using ull = unsigned long long; using pii = pair<int, int>; const int INF = 1 << 29; const double EPS = 1e-9; const ll MOD = 1000000007; const int dx[] = {1, 0, -1, 0}, dy[] = {0, -1, 0, 1}; ll X, P; const int MAX_TURN = 300; const int MAX_POS = 200; d...
p03901 CODE FESTIVAL 2016 Elimination Tournament Round 2 (Parallel) - Takahashi is Missing!
Aoki is in search of Takahashi, who is missing in a one-dimentional world. Initially, the coordinate of Aoki is 0, and the coordinate of Takahashi is known to be x, but his coordinate afterwards cannot be known to Aoki. Time is divided into turns. In each turn, Aoki and Takahashi take the following actions simultaneou...
{ "input": [ "6\n40", "101\n80", "3\n100" ], "output": [ "7.5000000", "63.7500000", "2.0000000" ] }
{ "input": [], "output": [] }
IN-CORRECT
cpp
#include <bits/stdc++.h> using namespace std; long long x, p; int main() { cin >> x >> p; if (p != 100) { return 1; } if (x % 2 == 0) { cout << x / 2 << endl; } else { cout << x / 2 + 1 << endl; } }
p03901 CODE FESTIVAL 2016 Elimination Tournament Round 2 (Parallel) - Takahashi is Missing!
Aoki is in search of Takahashi, who is missing in a one-dimentional world. Initially, the coordinate of Aoki is 0, and the coordinate of Takahashi is known to be x, but his coordinate afterwards cannot be known to Aoki. Time is divided into turns. In each turn, Aoki and Takahashi take the following actions simultaneou...
{ "input": [ "6\n40", "101\n80", "3\n100" ], "output": [ "7.5000000", "63.7500000", "2.0000000" ] }
{ "input": [], "output": [] }
IN-CORRECT
cpp
#include <bits/stdc++.h> using namespace std; using LL = long long; using ULL = unsigned long long; const double PI = acos(-1); template <class T> constexpr T INF() { return ::std::numeric_limits<T>::max(); } template <class T> constexpr T HINF() { return INF<T>() / 2; } template <typename T_char> T_char TL(T_char ...
p03901 CODE FESTIVAL 2016 Elimination Tournament Round 2 (Parallel) - Takahashi is Missing!
Aoki is in search of Takahashi, who is missing in a one-dimentional world. Initially, the coordinate of Aoki is 0, and the coordinate of Takahashi is known to be x, but his coordinate afterwards cannot be known to Aoki. Time is divided into turns. In each turn, Aoki and Takahashi take the following actions simultaneou...
{ "input": [ "6\n40", "101\n80", "3\n100" ], "output": [ "7.5000000", "63.7500000", "2.0000000" ] }
{ "input": [], "output": [] }
IN-CORRECT
cpp
#include <bits/stdc++.h> using namespace std; ifstream ifs("input"); using ll = long long; using pii = pair<int, int>; using vi = vector<int>; using vvi = vector<vi>; using vl = vector<ll>; using vvl = vector<vl>; const double PI = (1 * acos(0.0)); const double INF = 1e9; const double EPS = 1e-9; const double mod = 1e9...
p03901 CODE FESTIVAL 2016 Elimination Tournament Round 2 (Parallel) - Takahashi is Missing!
Aoki is in search of Takahashi, who is missing in a one-dimentional world. Initially, the coordinate of Aoki is 0, and the coordinate of Takahashi is known to be x, but his coordinate afterwards cannot be known to Aoki. Time is divided into turns. In each turn, Aoki and Takahashi take the following actions simultaneou...
{ "input": [ "6\n40", "101\n80", "3\n100" ], "output": [ "7.5000000", "63.7500000", "2.0000000" ] }
{ "input": [], "output": [] }
IN-CORRECT
cpp
#include <stdio.h> int main(void) { int a, b; scanf("%d%d", &x, &p); printf("%.12f", (double)((x + 1) / 2) * 100.0 / (double)p); return 0; }
p03901 CODE FESTIVAL 2016 Elimination Tournament Round 2 (Parallel) - Takahashi is Missing!
Aoki is in search of Takahashi, who is missing in a one-dimentional world. Initially, the coordinate of Aoki is 0, and the coordinate of Takahashi is known to be x, but his coordinate afterwards cannot be known to Aoki. Time is divided into turns. In each turn, Aoki and Takahashi take the following actions simultaneou...
{ "input": [ "6\n40", "101\n80", "3\n100" ], "output": [ "7.5000000", "63.7500000", "2.0000000" ] }
{ "input": [], "output": [] }
IN-CORRECT
cpp
#include <bits/stdc++.h> using namespace std; int main() { int x, p; double ans; cin >> x >> p; if (x % 2 == 0) { x /= 2; ans = x; ans *= 100; ans /= p; } else { x /= 2; ans = x * p + (x + 1) * (100 - p); ans /= p; ans += 1; } cout << fixed << setprecision(10) << ans << end...
p03901 CODE FESTIVAL 2016 Elimination Tournament Round 2 (Parallel) - Takahashi is Missing!
Aoki is in search of Takahashi, who is missing in a one-dimentional world. Initially, the coordinate of Aoki is 0, and the coordinate of Takahashi is known to be x, but his coordinate afterwards cannot be known to Aoki. Time is divided into turns. In each turn, Aoki and Takahashi take the following actions simultaneou...
{ "input": [ "6\n40", "101\n80", "3\n100" ], "output": [ "7.5000000", "63.7500000", "2.0000000" ] }
{ "input": [], "output": [] }
IN-CORRECT
cpp
#include <bits/stdc++.h> using namespace std; int main() { long long x; int p; cin >> x >> p; cout << (x + 1) / 2 << endl; }
p03901 CODE FESTIVAL 2016 Elimination Tournament Round 2 (Parallel) - Takahashi is Missing!
Aoki is in search of Takahashi, who is missing in a one-dimentional world. Initially, the coordinate of Aoki is 0, and the coordinate of Takahashi is known to be x, but his coordinate afterwards cannot be known to Aoki. Time is divided into turns. In each turn, Aoki and Takahashi take the following actions simultaneou...
{ "input": [ "6\n40", "101\n80", "3\n100" ], "output": [ "7.5000000", "63.7500000", "2.0000000" ] }
{ "input": [], "output": [] }
IN-CORRECT
cpp
#include <bits/stdc++.h> using namespace std; int main() { int n, p; cin >> n >> p; cout << (n % 2 ? 100.0 / p * (n / 2 + 1) : 100.0 / p * (n / 2)) << endl; }
p03901 CODE FESTIVAL 2016 Elimination Tournament Round 2 (Parallel) - Takahashi is Missing!
Aoki is in search of Takahashi, who is missing in a one-dimentional world. Initially, the coordinate of Aoki is 0, and the coordinate of Takahashi is known to be x, but his coordinate afterwards cannot be known to Aoki. Time is divided into turns. In each turn, Aoki and Takahashi take the following actions simultaneou...
{ "input": [ "6\n40", "101\n80", "3\n100" ], "output": [ "7.5000000", "63.7500000", "2.0000000" ] }
{ "input": [], "output": [] }
IN-CORRECT
cpp
#include <bits/stdc++.h> using namespace std; signed main() { ios::sync_with_stdio(false); cin.tie(0); cout << fixed << setprecision(20); long long x; cin >> x; double y = x; double p; cin >> p; if (abs(p - 100) < 0.01) { x++; cout << x / 2 << endl; return 0; } p /= 100.0; if (x % 2 ...
p03901 CODE FESTIVAL 2016 Elimination Tournament Round 2 (Parallel) - Takahashi is Missing!
Aoki is in search of Takahashi, who is missing in a one-dimentional world. Initially, the coordinate of Aoki is 0, and the coordinate of Takahashi is known to be x, but his coordinate afterwards cannot be known to Aoki. Time is divided into turns. In each turn, Aoki and Takahashi take the following actions simultaneou...
{ "input": [ "6\n40", "101\n80", "3\n100" ], "output": [ "7.5000000", "63.7500000", "2.0000000" ] }
{ "input": [], "output": [] }
IN-CORRECT
cpp
#include <bits/stdc++.h> using namespace std; int main() { long long int x, p; cin >> x >> p; cout << (x + 1) / 2 << endl; return 0; }
p03901 CODE FESTIVAL 2016 Elimination Tournament Round 2 (Parallel) - Takahashi is Missing!
Aoki is in search of Takahashi, who is missing in a one-dimentional world. Initially, the coordinate of Aoki is 0, and the coordinate of Takahashi is known to be x, but his coordinate afterwards cannot be known to Aoki. Time is divided into turns. In each turn, Aoki and Takahashi take the following actions simultaneou...
{ "input": [ "6\n40", "101\n80", "3\n100" ], "output": [ "7.5000000", "63.7500000", "2.0000000" ] }
{ "input": [], "output": [] }
IN-CORRECT
cpp
#include <bits/stdc++.h> using namespace std; int X; double p; double calc(int x) { double ret = 0; double pp = 1, np = 1; for (int i = 0; i < x / 2; i++) pp *= p; double comb = 1; for (long k = x / 2; k < 1e6; k++) { ret += k * pp * np * comb; np *= 1 - p; comb *= k; comb /= k - x / 2 + 1; ...
p03901 CODE FESTIVAL 2016 Elimination Tournament Round 2 (Parallel) - Takahashi is Missing!
Aoki is in search of Takahashi, who is missing in a one-dimentional world. Initially, the coordinate of Aoki is 0, and the coordinate of Takahashi is known to be x, but his coordinate afterwards cannot be known to Aoki. Time is divided into turns. In each turn, Aoki and Takahashi take the following actions simultaneou...
{ "input": [ "6\n40", "101\n80", "3\n100" ], "output": [ "7.5000000", "63.7500000", "2.0000000" ] }
{ "input": [], "output": [] }
IN-CORRECT
cpp
#include <bits/stdc++.h> using namespace std; template <class T> using vv = vector<vector<T> >; int main() { int x, p; cin >> x; cin >> p; if (p == 100) { double ans = (x + 1) / 2; printf("%.10f\n", ans); } return 0; }
p03901 CODE FESTIVAL 2016 Elimination Tournament Round 2 (Parallel) - Takahashi is Missing!
Aoki is in search of Takahashi, who is missing in a one-dimentional world. Initially, the coordinate of Aoki is 0, and the coordinate of Takahashi is known to be x, but his coordinate afterwards cannot be known to Aoki. Time is divided into turns. In each turn, Aoki and Takahashi take the following actions simultaneou...
{ "input": [ "6\n40", "101\n80", "3\n100" ], "output": [ "7.5000000", "63.7500000", "2.0000000" ] }
{ "input": [], "output": [] }
IN-CORRECT
cpp
#include <bits/stdc++.h> using namespace std; int main() { double p; long long int x; cin >> x >> p; double ans; double c; if (p == 100) { if (x % 2 == 0) cout << x / 2; else cout << (x + 1) / 2; return 0; } c = -1 * p / 100 + 1 * (100 - p) / 100; ans = x / (1 - c); cout << f...
p03901 CODE FESTIVAL 2016 Elimination Tournament Round 2 (Parallel) - Takahashi is Missing!
Aoki is in search of Takahashi, who is missing in a one-dimentional world. Initially, the coordinate of Aoki is 0, and the coordinate of Takahashi is known to be x, but his coordinate afterwards cannot be known to Aoki. Time is divided into turns. In each turn, Aoki and Takahashi take the following actions simultaneou...
{ "input": [ "6\n40", "101\n80", "3\n100" ], "output": [ "7.5000000", "63.7500000", "2.0000000" ] }
{ "input": [], "output": [] }
IN-CORRECT
cpp
#include <bits/stdc++.h> using namespace std; int main() { ios_base::sync_with_stdio(false); int x, p; cin >> x >> p; if (p != 100) { exit(0); } cout << 1.0 * ((x + 1) / 2) << endl; }
p03901 CODE FESTIVAL 2016 Elimination Tournament Round 2 (Parallel) - Takahashi is Missing!
Aoki is in search of Takahashi, who is missing in a one-dimentional world. Initially, the coordinate of Aoki is 0, and the coordinate of Takahashi is known to be x, but his coordinate afterwards cannot be known to Aoki. Time is divided into turns. In each turn, Aoki and Takahashi take the following actions simultaneou...
{ "input": [ "6\n40", "101\n80", "3\n100" ], "output": [ "7.5000000", "63.7500000", "2.0000000" ] }
{ "input": [], "output": [] }
IN-CORRECT
cpp
#include <iostream> #include <algorithm> #include <utility> #include <vector> #include <numeric> #include <tuple> template <class T, class U> inline bool chmin(T& lhs, const U& rhs) { if (lhs > rhs) { lhs = rhs; return true; } return false; } template <class T, class U> inline bool chmax(T& lhs, const ...
p03901 CODE FESTIVAL 2016 Elimination Tournament Round 2 (Parallel) - Takahashi is Missing!
Aoki is in search of Takahashi, who is missing in a one-dimentional world. Initially, the coordinate of Aoki is 0, and the coordinate of Takahashi is known to be x, but his coordinate afterwards cannot be known to Aoki. Time is divided into turns. In each turn, Aoki and Takahashi take the following actions simultaneou...
{ "input": [ "6\n40", "101\n80", "3\n100" ], "output": [ "7.5000000", "63.7500000", "2.0000000" ] }
{ "input": [], "output": [] }
IN-CORRECT
cpp
#include <bits/stdc++.h> using namespace std; int main() { cout.precision(20); long long x; long double p, ans; cin >> x >> p; ans = (x / 2) * 100 / p; if (x % 2) { ans += min((200 - p) / (100 - p), 100 / p); } cout << ans << endl; }
p03901 CODE FESTIVAL 2016 Elimination Tournament Round 2 (Parallel) - Takahashi is Missing!
Aoki is in search of Takahashi, who is missing in a one-dimentional world. Initially, the coordinate of Aoki is 0, and the coordinate of Takahashi is known to be x, but his coordinate afterwards cannot be known to Aoki. Time is divided into turns. In each turn, Aoki and Takahashi take the following actions simultaneou...
{ "input": [ "6\n40", "101\n80", "3\n100" ], "output": [ "7.5000000", "63.7500000", "2.0000000" ] }
{ "input": [], "output": [] }
IN-CORRECT
cpp
#include <bits/stdc++.h> using namespace std; int in() { int x; scanf("%d", &x); return x; } long long lin() { long long x; scanf("%lld", &x); return x; } long long MOD = 1e9 + 7; int main() { long long x = in(); long long p = in(); long long ans = 0; if (x % 2) x++; x /= 2; cout << (double)((do...
p03901 CODE FESTIVAL 2016 Elimination Tournament Round 2 (Parallel) - Takahashi is Missing!
Aoki is in search of Takahashi, who is missing in a one-dimentional world. Initially, the coordinate of Aoki is 0, and the coordinate of Takahashi is known to be x, but his coordinate afterwards cannot be known to Aoki. Time is divided into turns. In each turn, Aoki and Takahashi take the following actions simultaneou...
{ "input": [ "6\n40", "101\n80", "3\n100" ], "output": [ "7.5000000", "63.7500000", "2.0000000" ] }
{ "input": [], "output": [] }
IN-CORRECT
cpp
#include <bits/stdc++.h> using namespace std; long long int dy[] = {0, 0, 1, -1}; long long int dx[] = {1, -1, 0, 0}; long long int const MOD = 1000000007; namespace std { bool operator<(const complex<double>& a, const complex<double>& b) { return a.real() != b.real() ? a.real() < b.real() : a.imag() < b.imag(); } } ...
p03901 CODE FESTIVAL 2016 Elimination Tournament Round 2 (Parallel) - Takahashi is Missing!
Aoki is in search of Takahashi, who is missing in a one-dimentional world. Initially, the coordinate of Aoki is 0, and the coordinate of Takahashi is known to be x, but his coordinate afterwards cannot be known to Aoki. Time is divided into turns. In each turn, Aoki and Takahashi take the following actions simultaneou...
{ "input": [ "6\n40", "101\n80", "3\n100" ], "output": [ "7.5000000", "63.7500000", "2.0000000" ] }
{ "input": [], "output": [] }
IN-CORRECT
cpp
#include <bits/stdc++.h> using namespace std; class TaskA { public: void solve(std::istream& in, std::ostream& out) { int x, p; in >> x >> p; out << (x + 1) / 2; } }; int main() { std::ios_base::sync_with_stdio(false); TaskA solver; std::istream& in(std::cin); std::ostream& out(std::cout); in...
p03901 CODE FESTIVAL 2016 Elimination Tournament Round 2 (Parallel) - Takahashi is Missing!
Aoki is in search of Takahashi, who is missing in a one-dimentional world. Initially, the coordinate of Aoki is 0, and the coordinate of Takahashi is known to be x, but his coordinate afterwards cannot be known to Aoki. Time is divided into turns. In each turn, Aoki and Takahashi take the following actions simultaneou...
{ "input": [ "6\n40", "101\n80", "3\n100" ], "output": [ "7.5000000", "63.7500000", "2.0000000" ] }
{ "input": [], "output": [] }
IN-CORRECT
cpp
#include <bits/stdc++.h> using namespace std; using ll = long long; using ull = unsigned long long; using pii = pair<int, int>; const int INF = 1 << 29; const long double EPS = 1e-9; const ll MOD = 1000000007; const int dx[] = {1, 0, -1, 0}, dy[] = {0, -1, 0, 1}; ll X, P; const int MAX_TURN = 1000; const int MAX_POS = ...
p03901 CODE FESTIVAL 2016 Elimination Tournament Round 2 (Parallel) - Takahashi is Missing!
Aoki is in search of Takahashi, who is missing in a one-dimentional world. Initially, the coordinate of Aoki is 0, and the coordinate of Takahashi is known to be x, but his coordinate afterwards cannot be known to Aoki. Time is divided into turns. In each turn, Aoki and Takahashi take the following actions simultaneou...
{ "input": [ "6\n40", "101\n80", "3\n100" ], "output": [ "7.5000000", "63.7500000", "2.0000000" ] }
{ "input": [], "output": [] }
IN-CORRECT
cpp
#include <bits/stdc++.h> using namespace std; const int inf = 1e9; const int64_t inf64 = 1e18; const double eps = 1e-9; template <typename T> ostream &operator<<(ostream &os, const vector<T> &vec) { os << "["; for (const auto &v : vec) { os << v << ","; } os << "]"; return os; } void solve() { int x, p;...
p03901 CODE FESTIVAL 2016 Elimination Tournament Round 2 (Parallel) - Takahashi is Missing!
Aoki is in search of Takahashi, who is missing in a one-dimentional world. Initially, the coordinate of Aoki is 0, and the coordinate of Takahashi is known to be x, but his coordinate afterwards cannot be known to Aoki. Time is divided into turns. In each turn, Aoki and Takahashi take the following actions simultaneou...
{ "input": [ "6\n40", "101\n80", "3\n100" ], "output": [ "7.5000000", "63.7500000", "2.0000000" ] }
{ "input": [], "output": [] }
IN-CORRECT
cpp
#include <bits/stdc++.h> using namespace std; int main() { cout.precision(20); long long x; long double p, ans; cin >> x >> p; if (x % 2 == 0) { cout << (50 * x) / p << endl; } else { ans = (x / 2) * 100 / p; if (p <= 38) { cout << ans + (200 - p) / (100 - p) << endl; } else { co...
p03901 CODE FESTIVAL 2016 Elimination Tournament Round 2 (Parallel) - Takahashi is Missing!
Aoki is in search of Takahashi, who is missing in a one-dimentional world. Initially, the coordinate of Aoki is 0, and the coordinate of Takahashi is known to be x, but his coordinate afterwards cannot be known to Aoki. Time is divided into turns. In each turn, Aoki and Takahashi take the following actions simultaneou...
{ "input": [ "6\n40", "101\n80", "3\n100" ], "output": [ "7.5000000", "63.7500000", "2.0000000" ] }
{ "input": [], "output": [] }
IN-CORRECT
cpp
#include <bits/stdc++.h> using namespace std; int main() { ios_base::sync_with_stdio(false); int x, p; cin >> x >> p; if (p != 100) { exit(0); } cout << (x + 1) / 2. << endl; }
p03901 CODE FESTIVAL 2016 Elimination Tournament Round 2 (Parallel) - Takahashi is Missing!
Aoki is in search of Takahashi, who is missing in a one-dimentional world. Initially, the coordinate of Aoki is 0, and the coordinate of Takahashi is known to be x, but his coordinate afterwards cannot be known to Aoki. Time is divided into turns. In each turn, Aoki and Takahashi take the following actions simultaneou...
{ "input": [ "6\n40", "101\n80", "3\n100" ], "output": [ "7.5000000", "63.7500000", "2.0000000" ] }
{ "input": [], "output": [] }
IN-CORRECT
cpp
/*** Template Begin ***/ #include <algorithm> #include <array> #include <bitset> #include <cassert> #include <cmath> #include <complex> #include <cstdio> #include <cstdlib> #include <functional> #include <iomanip> #include <iostream> #include <list> #include <map> #include <queue> #include <set> #include <stack> #incl...
p03901 CODE FESTIVAL 2016 Elimination Tournament Round 2 (Parallel) - Takahashi is Missing!
Aoki is in search of Takahashi, who is missing in a one-dimentional world. Initially, the coordinate of Aoki is 0, and the coordinate of Takahashi is known to be x, but his coordinate afterwards cannot be known to Aoki. Time is divided into turns. In each turn, Aoki and Takahashi take the following actions simultaneou...
{ "input": [ "6\n40", "101\n80", "3\n100" ], "output": [ "7.5000000", "63.7500000", "2.0000000" ] }
{ "input": [], "output": [] }
IN-CORRECT
cpp
#include <bits/stdc++.h> using namespace std; const long long MOD = 1000000007ll; const double EPS = 1e-11; double pq[2521][2521]; int main() { long long x; int _p; cin >> x >> _p; if (x % 2 == 1) x++; double p = (double)_p / 100.0; double q = 1.0 - p; pq[0][0] = 1.0; for (int i = 0; i < (int)(2520); ++...
p03901 CODE FESTIVAL 2016 Elimination Tournament Round 2 (Parallel) - Takahashi is Missing!
Aoki is in search of Takahashi, who is missing in a one-dimentional world. Initially, the coordinate of Aoki is 0, and the coordinate of Takahashi is known to be x, but his coordinate afterwards cannot be known to Aoki. Time is divided into turns. In each turn, Aoki and Takahashi take the following actions simultaneou...
{ "input": [ "6\n40", "101\n80", "3\n100" ], "output": [ "7.5000000", "63.7500000", "2.0000000" ] }
{ "input": [], "output": [] }
IN-CORRECT
cpp
#include<bits/stdc++.h> using namespace std; typedef long long ll; signed main(){ ios::sync_with_stdio(false); cin.tie(0); cout << fixed << setprecision(20); ll x; cin>>x; double p; cin>>p; if(p==100){ x++ cout << x/2 << endl; return 0; } p/=100.0; ...
p03901 CODE FESTIVAL 2016 Elimination Tournament Round 2 (Parallel) - Takahashi is Missing!
Aoki is in search of Takahashi, who is missing in a one-dimentional world. Initially, the coordinate of Aoki is 0, and the coordinate of Takahashi is known to be x, but his coordinate afterwards cannot be known to Aoki. Time is divided into turns. In each turn, Aoki and Takahashi take the following actions simultaneou...
{ "input": [ "6\n40", "101\n80", "3\n100" ], "output": [ "7.5000000", "63.7500000", "2.0000000" ] }
{ "input": [], "output": [] }
IN-CORRECT
cpp
#include <bits/stdc++.h> using namespace std; template <class S, class T> ostream &operator<<(ostream &out, const pair<S, T> p) { return out << "(" << p.first << ", " << p.second << ")"; } template <class T> ostream &operator<<(ostream &out, const vector<T> &v) { out << "{"; for (int i = (0); i < (v.size()); i++)...
p03901 CODE FESTIVAL 2016 Elimination Tournament Round 2 (Parallel) - Takahashi is Missing!
Aoki is in search of Takahashi, who is missing in a one-dimentional world. Initially, the coordinate of Aoki is 0, and the coordinate of Takahashi is known to be x, but his coordinate afterwards cannot be known to Aoki. Time is divided into turns. In each turn, Aoki and Takahashi take the following actions simultaneou...
{ "input": [ "6\n40", "101\n80", "3\n100" ], "output": [ "7.5000000", "63.7500000", "2.0000000" ] }
{ "input": [], "output": [] }
IN-CORRECT
cpp
#include <bits/stdc++.h> using namespace std; int main() { long long x, p1; cin >> x >> p1; double p = p1 / 100.0; if (x % 2) x++; x /= 2; cout << ((double)x) / p << endl; }
p03901 CODE FESTIVAL 2016 Elimination Tournament Round 2 (Parallel) - Takahashi is Missing!
Aoki is in search of Takahashi, who is missing in a one-dimentional world. Initially, the coordinate of Aoki is 0, and the coordinate of Takahashi is known to be x, but his coordinate afterwards cannot be known to Aoki. Time is divided into turns. In each turn, Aoki and Takahashi take the following actions simultaneou...
{ "input": [ "6\n40", "101\n80", "3\n100" ], "output": [ "7.5000000", "63.7500000", "2.0000000" ] }
{ "input": [], "output": [] }
IN-CORRECT
cpp
#include <bits/stdc++.h> using namespace std; template <class S, class T> istream& operator>>(istream& is, pair<S, T>& p) { return is >> p.first >> p.second; } const double EPS = 1e-10; const double PI = acos(-1.0); const long long MOD = 1e9 + 7; double C[1010][1010]; int main() { long long x, p; cin >> x >> p; ...
p03901 CODE FESTIVAL 2016 Elimination Tournament Round 2 (Parallel) - Takahashi is Missing!
Aoki is in search of Takahashi, who is missing in a one-dimentional world. Initially, the coordinate of Aoki is 0, and the coordinate of Takahashi is known to be x, but his coordinate afterwards cannot be known to Aoki. Time is divided into turns. In each turn, Aoki and Takahashi take the following actions simultaneou...
{ "input": [ "6\n40", "101\n80", "3\n100" ], "output": [ "7.5000000", "63.7500000", "2.0000000" ] }
{ "input": [], "output": [] }
IN-CORRECT
cpp
#include <bits/stdc++.h> using namespace std; float X; float rad; float ans; int main() { cin >> X >> rad; if (rad == 100) { cout << (int)(X + 1) / 2 << "\n"; } return 0; }
p03901 CODE FESTIVAL 2016 Elimination Tournament Round 2 (Parallel) - Takahashi is Missing!
Aoki is in search of Takahashi, who is missing in a one-dimentional world. Initially, the coordinate of Aoki is 0, and the coordinate of Takahashi is known to be x, but his coordinate afterwards cannot be known to Aoki. Time is divided into turns. In each turn, Aoki and Takahashi take the following actions simultaneou...
{ "input": [ "6\n40", "101\n80", "3\n100" ], "output": [ "7.5000000", "63.7500000", "2.0000000" ] }
{ "input": [], "output": [] }
IN-CORRECT
UNKNOWN
import Control.Monad import Control.Applicative main :: IO () main = do x <- readLn getLine print $ (x+1)`div`2
p03901 CODE FESTIVAL 2016 Elimination Tournament Round 2 (Parallel) - Takahashi is Missing!
Aoki is in search of Takahashi, who is missing in a one-dimentional world. Initially, the coordinate of Aoki is 0, and the coordinate of Takahashi is known to be x, but his coordinate afterwards cannot be known to Aoki. Time is divided into turns. In each turn, Aoki and Takahashi take the following actions simultaneou...
{ "input": [ "6\n40", "101\n80", "3\n100" ], "output": [ "7.5000000", "63.7500000", "2.0000000" ] }
{ "input": [], "output": [] }
IN-CORRECT
cpp
#include <bits/stdc++.h> using namespace std; struct Initializer { Initializer() { cin.tie(0); ios::sync_with_stdio(0); cout << fixed << setprecision(15); } } initializer; int main() { int x, p; cin >> x >> p; if (p == 100) { cout << (x + 1) / 2 << endl; return 0; } if (x > 10) exit(-1...
p03901 CODE FESTIVAL 2016 Elimination Tournament Round 2 (Parallel) - Takahashi is Missing!
Aoki is in search of Takahashi, who is missing in a one-dimentional world. Initially, the coordinate of Aoki is 0, and the coordinate of Takahashi is known to be x, but his coordinate afterwards cannot be known to Aoki. Time is divided into turns. In each turn, Aoki and Takahashi take the following actions simultaneou...
{ "input": [ "6\n40", "101\n80", "3\n100" ], "output": [ "7.5000000", "63.7500000", "2.0000000" ] }
{ "input": [], "output": [] }
IN-CORRECT
cpp
#include <iostream> #include <sstream> #include <algorithm> #include <string> #include <vector> #include <map> #include <set> #include <queue> #include <deque> #include <stack> #include <memory> #include <complex> #include <numeric> #include <cstdio> #include <iomanip> #define REP(i,m,n) for(int i=int(m);i<int(n);i++)...
p03901 CODE FESTIVAL 2016 Elimination Tournament Round 2 (Parallel) - Takahashi is Missing!
Aoki is in search of Takahashi, who is missing in a one-dimentional world. Initially, the coordinate of Aoki is 0, and the coordinate of Takahashi is known to be x, but his coordinate afterwards cannot be known to Aoki. Time is divided into turns. In each turn, Aoki and Takahashi take the following actions simultaneou...
{ "input": [ "6\n40", "101\n80", "3\n100" ], "output": [ "7.5000000", "63.7500000", "2.0000000" ] }
{ "input": [], "output": [] }
IN-CORRECT
cpp
x = int(input()) p = int(input()) p *= 0.01 print((x+1)//2/p)
p03901 CODE FESTIVAL 2016 Elimination Tournament Round 2 (Parallel) - Takahashi is Missing!
Aoki is in search of Takahashi, who is missing in a one-dimentional world. Initially, the coordinate of Aoki is 0, and the coordinate of Takahashi is known to be x, but his coordinate afterwards cannot be known to Aoki. Time is divided into turns. In each turn, Aoki and Takahashi take the following actions simultaneou...
{ "input": [ "6\n40", "101\n80", "3\n100" ], "output": [ "7.5000000", "63.7500000", "2.0000000" ] }
{ "input": [], "output": [] }
IN-CORRECT
cpp
#include <bits/stdc++.h> using namespace std; const int INF = 0x1f1f1f1f; const long long INFLL = 0x1f1f1f1f1f1f1f1fLL; template <class A, class B> inline ostream& operator<<(ostream& st, const pair<A, B>& P) { return st << "(" << P.first << "," << P.second << ")"; }; template <class A, class B> inline pair<A, B> ope...
p03901 CODE FESTIVAL 2016 Elimination Tournament Round 2 (Parallel) - Takahashi is Missing!
Aoki is in search of Takahashi, who is missing in a one-dimentional world. Initially, the coordinate of Aoki is 0, and the coordinate of Takahashi is known to be x, but his coordinate afterwards cannot be known to Aoki. Time is divided into turns. In each turn, Aoki and Takahashi take the following actions simultaneou...
{ "input": [ "6\n40", "101\n80", "3\n100" ], "output": [ "7.5000000", "63.7500000", "2.0000000" ] }
{ "input": [], "output": [] }
IN-CORRECT
cpp
#include <bits/stdc++.h> using namespace std; const double eps = 1e-10; const double pi = acos(-1.0); const double inf = (int)1e8; int main() { long long x, p; std::cin >> x >> p; if (x % 2 == 0) std::cout << x / 2 << ".00000000" << std::endl; else std::cout << x / 2 + 1 << std::endl; }
p03901 CODE FESTIVAL 2016 Elimination Tournament Round 2 (Parallel) - Takahashi is Missing!
Aoki is in search of Takahashi, who is missing in a one-dimentional world. Initially, the coordinate of Aoki is 0, and the coordinate of Takahashi is known to be x, but his coordinate afterwards cannot be known to Aoki. Time is divided into turns. In each turn, Aoki and Takahashi take the following actions simultaneou...
{ "input": [ "6\n40", "101\n80", "3\n100" ], "output": [ "7.5000000", "63.7500000", "2.0000000" ] }
{ "input": [], "output": [] }
IN-CORRECT
cpp
#include <bits/stdc++.h> using namespace std; using ll = long long; using ull = unsigned long long; using pii = pair<int, int>; const int INF = 1 << 29; const double EPS = 1e-9; const ll MOD = 1000000007; const int dx[] = {1, 0, -1, 0}, dy[] = {0, -1, 0, 1}; ll X, P; const int MAX_TURN = 100; map<tuple<int, int, int>, ...
p03901 CODE FESTIVAL 2016 Elimination Tournament Round 2 (Parallel) - Takahashi is Missing!
Aoki is in search of Takahashi, who is missing in a one-dimentional world. Initially, the coordinate of Aoki is 0, and the coordinate of Takahashi is known to be x, but his coordinate afterwards cannot be known to Aoki. Time is divided into turns. In each turn, Aoki and Takahashi take the following actions simultaneou...
{ "input": [ "6\n40", "101\n80", "3\n100" ], "output": [ "7.5000000", "63.7500000", "2.0000000" ] }
{ "input": [], "output": [] }
IN-CORRECT
cpp
#include <bits/stdc++.h> using namespace std; signed main() { ios::sync_with_stdio(false); cin.tie(0); cout << fixed << setprecision(20); long long x; cin >> x; double y = x; double p; cin >> p; if (p == 100) { x++; cout << x / 2 << endl; return 0; } p /= 100.0; if (x % 2 == 0) { ...
p03901 CODE FESTIVAL 2016 Elimination Tournament Round 2 (Parallel) - Takahashi is Missing!
Aoki is in search of Takahashi, who is missing in a one-dimentional world. Initially, the coordinate of Aoki is 0, and the coordinate of Takahashi is known to be x, but his coordinate afterwards cannot be known to Aoki. Time is divided into turns. In each turn, Aoki and Takahashi take the following actions simultaneou...
{ "input": [ "6\n40", "101\n80", "3\n100" ], "output": [ "7.5000000", "63.7500000", "2.0000000" ] }
{ "input": [], "output": [] }
IN-CORRECT
cpp
#include <bits/stdc++.h> int main(void) { int a[100000]; int c[100000]; int s; int n; int x; int y; int z; scanf("%d", &x); scanf("%d", &n); printf("%d", (x + 1) / 2); return 0; }
p03901 CODE FESTIVAL 2016 Elimination Tournament Round 2 (Parallel) - Takahashi is Missing!
Aoki is in search of Takahashi, who is missing in a one-dimentional world. Initially, the coordinate of Aoki is 0, and the coordinate of Takahashi is known to be x, but his coordinate afterwards cannot be known to Aoki. Time is divided into turns. In each turn, Aoki and Takahashi take the following actions simultaneou...
{ "input": [ "6\n40", "101\n80", "3\n100" ], "output": [ "7.5000000", "63.7500000", "2.0000000" ] }
{ "input": [], "output": [] }
IN-CORRECT
cpp
#include <bits/stdc++.h> using namespace std; const double PI = acos(-1); const double EPS = 1e-8; const int inf = 1e8; int main() { int x; double p; cin >> x >> p; if (p == 100) { cout << (x + 1) / 2 << endl; return 0; } vector<double> dp(2000); dp[x - 1] = 1; double out = 0; for (int i = 0; ...