Submission #1080981


Source Code Expand

Copy
#include<bits/stdc++.h>
using namespace std;

#define int long long
typedef vector<int>vint;
typedef pair<int,int>pint;
typedef vector<pint>vpint;
#define rep(i,n) for(int i=0;i<(n);i++)
#define reps(i,f,n) for(int i=(f);i<(n);i++)
#define all(v) (v).begin(),(v).end()
#define each(it,v) for(__typeof((v).begin()) it=(v).begin();it!=(v).end();it++)
#define pb push_back
#define fi first
#define se second
template<typename A,typename B>inline void chmin(A &a,B b){if(a>b)a=b;}
template<typename A,typename B>inline void chmax(A &a,B b){if(a<b)a=b;}

signed main(){
    int x;
    cin>>x;
    int ans=(x/11)*2;
    x%=11;
    if(x){
        ans++;
        x=max(0ll,x-5);
    }
    if(x)ans++;
    cout<<ans<<endl;
    return 0;
}

Submission Info

Submission Time
Task C - X: Yet Another Die Game
User latte0119
Language C++14 (GCC 5.4.1)
Score 0
Code Size 760 Byte
Status
Exec Time 3 ms
Memory 256 KB

Test Cases

Set Name Score / Max Score Test Cases
Sample 0 / 0 00_example_01.txt, 00_example_02.txt
All 0 / 300 00_example_01.txt, 00_example_02.txt, 01.txt, 02.txt, 03.txt, 04.txt, 05.txt, 06.txt, 07.txt, 08.txt, 09.txt, 10.txt, 11.txt, 12.txt, 13.txt, 14.txt, 15.txt, 16.txt
Case Name Status Exec Time Memory
00_example_01.txt 2 ms 256 KB
00_example_02.txt 3 ms 256 KB
01.txt 2 ms 256 KB
02.txt 2 ms 256 KB
03.txt 3 ms 256 KB
04.txt 3 ms 256 KB
05.txt 2 ms 256 KB
06.txt 3 ms 256 KB
07.txt 3 ms 256 KB
08.txt 3 ms 256 KB
09.txt 3 ms 256 KB
10.txt 2 ms 256 KB
11.txt 3 ms 256 KB
12.txt 2 ms 256 KB
13.txt 2 ms 256 KB
14.txt 3 ms 256 KB
15.txt 3 ms 256 KB
16.txt 2 ms 256 KB