AtCoder Beginner Contest 019

Submission #344972

Source codeソースコード

#include <cstdlib>
#include <cmath>
#include <climits>
#include <cfloat>
#include <map>
#include <utility>
#include <set>
#include <iostream>
#include <memory>
#include <string>
#include <vector>
#include <algorithm>
#include <functional>
#include <sstream>
#include <deque>
#include <complex>
#include <stack>
#include <queue>
#include <cstdio>
#include <cctype>
#include <cstring>
#include <ctime>
#include <iterator>
#include <bitset>
#include <numeric>
#include <list>
#include <iomanip>

#if __cplusplus >= 201103L
#include <array>
#include <tuple>
#include <initializer_list>
#include <unordered_set>
#include <unordered_map>
#include <forward_list>

#define cauto const auto&
#endif

using namespace std;


typedef long long LL;
typedef pair<int,int> pii;
typedef pair<LL,LL> pll;

typedef vector<int> vint;
typedef vector<vector<int> > vvint;
typedef vector<long long> vll, vLL;
typedef vector<vector<long long> > vvll, vvLL;

#define VV(T) vector<vector< T > >

template <class T>
void initvv(vector<vector<T> > &v, int a, int b, const T &t = T()){
	v.assign(a, vector<T>(b, t));
}

template <class F, class T>
void convert(const F &f, T &t){
	stringstream ss;
	ss << f;
	ss >> t;
}


#define REP(i,n) for(int i=0;i<int(n);++i)
#define ALL(v) (v).begin(),(v).end()
#define RALL(v) (v).rbegin(),(v).rend()
#define PB push_back


#define MOD 1000000009LL
#define EPS 1e-8



int main(){
	LL a, b, c, d, e, f;
	LL x, y, z;
	double p, q, r;
	string s = "a", t, u;
	
	a = b = c = d = e = f = 0;
	x = y = z = 0;
	p = q = r = 0.0;
	
	cin >> a >> b >> c >> d >> e >> f;
	cin.clear();
	cin >> s >> t >> u;
	cin.clear();
	
	LL v[3] = {a, b, c};
	sort(ALL(v));
	x = v[1];
	
	;cout << x << endl;
}

Submission

Task問題 A - 高橋くんと年齢
User nameユーザ名 climpet
Created time投稿日時
Language言語 C++11 (GCC 4.8.1)
Status状態 CE
Score得点 -
Source lengthソースコード長 1793 Byte
File nameファイル名
Exec time実行時間 -
Memory usageメモリ使用量 -

Compiler messageコンパイルメッセージ

./Main.cpp: In function ‘int main()’:
./Main.cpp:68:20: error: request for member ‘begin’ in ‘v’, which is of non-class type ‘LL [3] {aka long long int [3]}’
#define ALL(v) (v).begin(),(v).end()
^
./Main.cpp:94:7: note: in expansion of macro ‘ALL’
sort(ALL(v));
^
./Main.cpp:68:32: error: request for member ‘end’ in ‘v’, which is of non-class type ‘LL [3] {aka long long int [3]}’
#define ALL(v) (v).begin(),(v).end()
^
./Main.cpp:94:7: note: in expansion of macro ‘ALL’
sort(ALL(v));
^

Test case