Submission #1865588
Source Code Expand
#include <algorithm> #include <climits> #include <cmath> #include <cstdio> #include <cstdlib> #include <ctime> #include <iostream> #include <sstream> #include <functional> #include <map> #include <string> #include <cstring> #include <vector> #include <queue> #include <stack> #include <deque> #include <set> #include <list> #include <numeric> using namespace std; typedef long long ll; typedef unsigned long long ull; typedef pair<ll,ll> P; const double PI = 3.14159265358979323846; const double EPS = 1e-12; const ll INF = 1LL<<29; const ll mod = 1e9+7; #define rep(i,n) for(int (i)=0;(i)<(ll)(n);++(i)) #define repd(i,n,d) for(ll (i)=0;(i)<(ll)(n);(i)+=(d)) #define all(v) (v).begin(), (v).end() #define pb(x) push_back(x) #define mp(x,y) make_pair((x),(y)) #define mset(m,v) memset((m),(v),sizeof(m)) #define chmin(X,Y) ((X)>(Y)?X=(Y),true:false) #define chmax(X,Y) ((X)<(Y)?X=(Y),true:false) #define fst first #define snd second #define UNIQUE(x) (x).erase(unique(all(x)),(x).end()) template<class T> ostream &operator<<(ostream &os, const vector<T> &v){int n=v.size();rep(i,n)os<<v[i]<<(i==n-1?"":" ");return os;} int main(){ int a[3]; rep(i, 3) cin>>a[i]; sort(all(a)); if(a[0]==5&&a[1]==5&&a[2]==7) cout<<"YES"<<endl; else cout<<"NO"<<endl; return 0; }
Submission Info
Submission Time | |
---|---|
Task | A - Iroha and Haiku (ABC Edition) |
User | Lepton |
Language | C++14 (GCC 5.4.1) |
Score | 0 |
Code Size | 1315 Byte |
Status | CE |
Compile Error
./Main.cpp: In function ‘int main()’: ./Main.cpp:30:20: error: request for member ‘begin’ in ‘a’, which is of non-class type ‘int [3]’ #define all(v) (v).begin(), (v).end() ^ ./Main.cpp:44:7: note: in expansion of macro ‘all’ sort(all(a)); ^ ./Main.cpp:30:33: error: request for member ‘end’ in ‘a’, which is of non-class type ‘int [3]’ #define all(v) (v).begin(), (v).end() ^ ./Main.cpp:44:7: note: in expansion of macro ‘all’ sort(all(a)); ^