Submission #692533
Source Code Expand
#include<bits/stdc++.h>
//#include<iostream>
//#include<list>
//#include<iomanip>
//#include<vector>
//#include<sstream>
//#include<algorithm>
//#include<stack>
//#include<queue>
//#include<cmath>
//#include<cstring>
//#include<climits>
//#include<map>
//#include<set>
//#include<unordered_set>
#define FOR(i,a,b) for(int i=(a);i<(b);i++)
using namespace std;
#define set_bit(bit,i) ((bit) | (1<<(i)))
#define check_bit(bit,i) (((bit) & (1<<(i))) != 0)
#define clear_bit(bit,i) ((bit) & (~(1<<(i))))
typedef unsigned long long int ull;
typedef long long int ll;
typedef pair<int,int> PII;
typedef pair<PII,PII> PIII;
typedef pair<ll,ll> PLL;
typedef pair<PLL ,PLL> PLLL;
typedef pair<string,string> PSS;
typedef vector<int> VI;
typedef vector<VI> MATRIX;
ll popcount(ull x)
{
x = ((x & 0xaaaaaaaaaaaaaaaaUL) >> 1)
+ (x & 0x5555555555555555UL);
x = ((x & 0xccccccccccccccccUL) >> 2)
+ (x & 0x3333333333333333UL);
x = ((x & 0xf0f0f0f0f0f0f0f0UL) >> 4)
+ (x & 0x0f0f0f0f0f0f0f0fUL);
x = ((x & 0xff00ff00ff00ff00UL) >> 8)
+ (x & 0x00ff00ff00ff00ffUL);
x = ((x & 0xffff0000ffff0000UL) >> 16)
+ (x & 0x0000ffff0000ffffUL);
x = ((x & 0xffffffff00000000UL) >> 32)
+ (x & 0x00000000ffffffffUL);
return x;
}
bool isprime(ll n){
if(n==1) return false;
if(n==2) return true;
FOR(i,2,n){
if(n%i==0){ return false; }
}
return true;
}
int par[1000];
int root(int i){
if(par[i]==i) return i;
return par[i] = root(par[i]);
}
int unite(int i, int j){
int x = root(i);
int y = root(j);
par[x] = y;
}
// stoi(), to_string()
// cout<<fixed<<setprecision(7)
// sort(t.begin(), t.end(), greater<int>());
// 組合せ
ll c (ll n, ll k, ll m) {
static ll memo[1000][1000];
if (memo[n][k]!=0) return memo[n][k];
else if(n==k) return memo[n][k]=1;
else if(k==0) return memo[n][k]=1;
else return memo[n][k]=(c(n-1,k-1,m)+c(n-1,k,m))%m;
}
// 重複組合せ
ll hcomp(ll n, ll k, ll m) {
return c(k+n-1,k,m);
}
ll mplus(ll x, ll y) {
return (x+y) % 1000000007L;
}
// x^y % m
ll mpow(ll x, ll y, ll m) {
x %= m;
ll result = 1;
while (y > 0) {
if (y & 1) result = (result * x) % m;
x = (x * x) % m;
y >>= 1;
}
return result;
}
// mod inverse 法mにおけるxの逆数
ull minverse(ull x, ull m) {
return mpow(x, m-2, m);
}
ull s2ull(string s) {
ull x=0;
ull n=s.size();
FOR(i,0,n) {
x |= (s[n-1-i]=='o'?1:0)<<i;
}
return x;
}
ull rshift(ull x, int n) {
ull o = x & 1;
x = x>>1;
x |= o<<(n-1);
return x;
}
//=============================
int main(void) {
double m;
int vv;
cin>>m;
m/=1000;
if(m<0.1){
vv = 0;
} else if (m<=5){
vv = m*10;
} else if(m<=30){
vv = m+50;
} else if(m<=70){
vv = (m-30)/5 + 80;
} else if(m>=70){
vv = 89;
}
printf("%02d\n",vv);
return 0;
}
Submission Info
Submission Time |
|
Task |
B - 視程の通報 |
User |
bobuhiro11 |
Language |
C++11 (GCC 4.8.1) |
Score |
100 |
Code Size |
3160 Byte |
Status |
AC |
Exec Time |
28 ms |
Memory |
924 KB |
Judge Result
Set Name |
all |
Score / Max Score |
100 / 100 |
Status |
|
Set Name |
Test Cases |
all |
00_sample_01.txt, 00_sample_02.txt, 00_sample_03.txt, test_01.txt, test_02.txt, test_03.txt, test_04.txt, test_05.txt, test_06.txt, test_07.txt, test_08.txt, test_09.txt, test_10.txt, test_11.txt, test_12.txt, test_13.txt, test_14.txt, test_15.txt, test_16.txt, test_17.txt, test_18.txt, test_19.txt, test_20.txt, test_21.txt, test_22.txt, test_23.txt, test_24.txt, test_25.txt, test_26.txt, test_27.txt, test_28.txt, test_29.txt, test_30.txt, test_31.txt, test_32.txt, test_33.txt, test_34.txt, test_35.txt |
Case Name |
Status |
Exec Time |
Memory |
00_sample_01.txt |
AC |
27 ms |
876 KB |
00_sample_02.txt |
AC |
27 ms |
848 KB |
00_sample_03.txt |
AC |
27 ms |
800 KB |
test_01.txt |
AC |
27 ms |
800 KB |
test_02.txt |
AC |
27 ms |
804 KB |
test_03.txt |
AC |
27 ms |
876 KB |
test_04.txt |
AC |
26 ms |
876 KB |
test_05.txt |
AC |
26 ms |
804 KB |
test_06.txt |
AC |
27 ms |
792 KB |
test_07.txt |
AC |
26 ms |
796 KB |
test_08.txt |
AC |
27 ms |
880 KB |
test_09.txt |
AC |
28 ms |
888 KB |
test_10.txt |
AC |
26 ms |
804 KB |
test_11.txt |
AC |
27 ms |
924 KB |
test_12.txt |
AC |
27 ms |
800 KB |
test_13.txt |
AC |
26 ms |
804 KB |
test_14.txt |
AC |
26 ms |
796 KB |
test_15.txt |
AC |
25 ms |
844 KB |
test_16.txt |
AC |
27 ms |
800 KB |
test_17.txt |
AC |
26 ms |
804 KB |
test_18.txt |
AC |
26 ms |
800 KB |
test_19.txt |
AC |
26 ms |
876 KB |
test_20.txt |
AC |
26 ms |
880 KB |
test_21.txt |
AC |
26 ms |
876 KB |
test_22.txt |
AC |
25 ms |
924 KB |
test_23.txt |
AC |
26 ms |
800 KB |
test_24.txt |
AC |
27 ms |
872 KB |
test_25.txt |
AC |
27 ms |
796 KB |
test_26.txt |
AC |
26 ms |
804 KB |
test_27.txt |
AC |
26 ms |
800 KB |
test_28.txt |
AC |
26 ms |
796 KB |
test_29.txt |
AC |
27 ms |
792 KB |
test_30.txt |
AC |
27 ms |
868 KB |
test_31.txt |
AC |
26 ms |
916 KB |
test_32.txt |
AC |
24 ms |
792 KB |
test_33.txt |
AC |
25 ms |
924 KB |
test_34.txt |
AC |
28 ms |
920 KB |
test_35.txt |
AC |
28 ms |
872 KB |