Submission #174011


Source Code Expand

#pragma warning(disable:4996)
#include <iostream>
#include <sstream>
#include <fstream>
#include <complex>
#include <ctime>
#include <cstdlib>
#include <cstring>
#include <cctype>
#include <string>
#include <vector>
#include <queue>
#include <stack>
#include <map>
#include <set>
#include <cmath>
#include <algorithm>
#include <functional>
#include <numeric>

using namespace std;

typedef vector<int> vi;
typedef vector<vi> vii;
typedef vector<string> vs;
typedef vector<bool> vb;
typedef vector<vb> vbb;
typedef pair<int, int> pii;
typedef long long ll;
typedef unsigned long long ull;

#define all(a) (a).begin(),(a).end()
#define rall(a) (a).rbegin(), (a).rend()
#define pb push_back
#define mp make_pair

#define loop(i,a,b) for(int i=(a);i<ull(b);++i)
#define rep(i,n) loop(i,0,n)
#define iter(i,c) for(auto i=(c).begin(); i!=(c).end(); ++i)
#define riter(i,c) for(auto i=(c).rbegin(); i!=(c).rend(); ++i)

const double eps = 1e-10;
const double pi = acos(-1.0);
const double inf = (int)1e8;

namespace std {
    template<typename T>ostream&operator<<(ostream&os, vector<T>const&v){
        iter(it, v) os << *it << (it + 1 == v.end() ? "" : ",");
        return os;
    }
    template<typename T, typename U>ostream&operator<<(ostream&os, const pair<T, U>&p){
        return os << "[" << p.dirst << "," << p.second << "]";
    }
}

#define clr(a,i) memset((a), (i) ,sizeof(a))

int main(){
    int a, b, c;
    while (cin >> a >> b >> c){
        cout << (a+1) / 2 << endl;
    }
}

Submission Info

Submission Time
Task A - 引越し作業
User tubo28
Language C++ (G++ 4.6.4)
Score 0
Code Size 1552 Byte
Status CE

Compile Error

./Main.cpp: In function ‘std::ostream& std::operator<<(std::ostream&, const std::vector<T>&)’:
./Main.cpp:48:9: error: ‘it’ does not name a type
./Main.cpp:48:9: error: expected ‘;’ before ‘it’
./Main.cpp:48:9: error: ‘it’ was not declared in this scope