Submission #244414
Source Code Expand
#include <bits/stdc++.h> #define all(x) begin(x), end(x) #define rall(x) (x).rbegin(),(x).rend() #define sz(x) ((int)(x).size()) #define REP(i,b,n) for(int i=(int)(b);i<(int)(n);++i) #define rep(i,n) REP(i,0,n) #define repsz(i,v) rep(i,sz(v)) #define eb emplace_back #define mt make_tuple #define cau const auto& #define bit(n) (1LL<(n)) using namespace std; #define int long long static const int INF = 1<<25; static const double EPS = 1e-5; typedef long long ll; template<class T> T mineq(T &a, const T &b){ return a = min(a, b); } template<class T> T maxeq(T &a, const T &b){ return a = max(a, b); } bool solve(){ int n; cin >> n; if(n % 2 == 0){ cout << n/2 << endl; }else{ cout << n/2 + 3 << endl; } return true; } signed main(){ //cin.tie(0); //ios_base::sync_with_stdio(0); cout.setf(ios::fixed); cout.precision(10); solve(); return 0; } // vim:set foldmethod=marker commentstring=//%s:
Submission Info
Submission Time | |
---|---|
Task | B - 3歩進んで2歩下がる |
User | MiSawa |
Language | C++11 (GCC 4.8.1) |
Score | 100 |
Code Size | 987 Byte |
Status | AC |
Exec Time | 27 ms |
Memory | 928 KB |
Judge Result
Set Name | All | ||
---|---|---|---|
Score / Max Score | 100 / 100 | ||
Status |
|
Set Name | Test Cases |
---|---|
All | test_1.txt, test_1000000000000000.txt, test_111723.txt, test_130146966901509.txt, test_161925824289921.txt, test_35454587585157.txt, test_5.txt, test_5540.txt, test_6021.txt, test_805.txt, test_845717671383532.txt, test_865385763670868.txt, sample_01.txt, sample_02.txt |
Case Name | Status | Exec Time | Memory |
---|---|---|---|
sample_01.txt | AC | 24 ms | 672 KB |
sample_02.txt | AC | 24 ms | 680 KB |
test_1.txt | AC | 26 ms | 928 KB |
test_1000000000000000.txt | AC | 24 ms | 700 KB |
test_111723.txt | AC | 26 ms | 676 KB |
test_130146966901509.txt | AC | 25 ms | 928 KB |
test_161925824289921.txt | AC | 25 ms | 796 KB |
test_35454587585157.txt | AC | 25 ms | 924 KB |
test_5.txt | AC | 24 ms | 928 KB |
test_5540.txt | AC | 26 ms | 740 KB |
test_6021.txt | AC | 27 ms | 796 KB |
test_805.txt | AC | 25 ms | 676 KB |
test_845717671383532.txt | AC | 25 ms | 800 KB |
test_865385763670868.txt | AC | 23 ms | 676 KB |