제출 #1095379

#제출 시각아이디문제언어결과실행 시간메모리
1095379MathandskiDetecting Molecules (IOI16_molecules)C++17
컴파일 에러
0 ms0 KiB
#define is insert #define lb lower_bound #define ll long long #define V vector #define MS multiset #define PL pair<ll, ll> #define F first #define S second #define PQ priority_queue #define f0r(i, begin, end) for (ll i = begin; i < end; i ++) #define For(i, end, begin) for (ll i = end; i > begin; i --) #define all(x) x.begin(), x.end() #define INF 1000000000000000000 #define inf 1000000000 #define MOD 1000000007 #define len(x) (ll)x.size() #define fileread(file) ifstream fin; fin.open((string)file + ".in"); ofstream fout; fout.open((string)file + ".out") #define fastio ios_base::sync_with_stdio(0); cin.tie(nullptr) template<typename T> istream& operator>>(istream& in, vector<T>& a) {for(auto &x : a) in >> x; return in;}; template<typename T> ostream& operator<<(ostream& out, vector<T>& a) {for(auto &x : a) out << x << ' '; return out;}; V<int> find_subset (int l, int u, V<int> w) { return {1, 3}; }

컴파일 시 표준 에러 (stderr) 메시지

molecules.cpp:19:22: error: 'istream' does not name a type
   19 | template<typename T> istream& operator>>(istream& in, vector<T>& a) {for(auto &x : a) in >> x; return in;};
      |                      ^~~~~~~
molecules.cpp:20:22: error: 'ostream' does not name a type
   20 | template<typename T> ostream& operator<<(ostream& out, vector<T>& a) {for(auto &x : a) out << x << ' '; return out;};
      |                      ^~~~~~~
molecules.cpp:4:11: error: 'vector' does not name a type
    4 | #define V vector
      |           ^~~~~~
molecules.cpp:22:1: note: in expansion of macro 'V'
   22 | V<int> find_subset (int l, int u, V<int> w) {
      | ^