제출 #1279325

#제출 시각아이디문제언어결과실행 시간메모리
1279325luattapcodeTug of War (BOI15_tug)C++20
0 / 100
3 ms832 KiB
/*The best way to get something done is to begin*/ #include <bits/stdc++.h> #define ll long long #define int long long #define fr(i,a,b) for(int i=a;i<=b;i++) #define frd(i,a,b) for(int i=a;i>=b;i--) #define pb push_back #define fi first #define se second #define el '\n' using namespace std; template <class X, class Y> bool minimize(X &x, const Y &y) {if (x > y) {x = y;return true;} else return false;} template <class X, class Y> bool maximize(X &x, const Y &y) {if (x < y) {x = y;return true;} else return false;} /* Author: Huynh Quoc Luat */ /*Khai Bao*/ const long long inf=1e18; const int oo=1e9; const int LO=21; const int CH=27; const int N=1e5+5; const int sm=1e9+7; int n,k; struct bg{ int x,y,z; }; bg a[N]; //void add(int &x,const int &y){x+=y;if(x>=sm)x-=sm;} //void sub(int &x,const int &y){x-=y;if(x<0)x+=sm;} void read() { cin >> n >> k; fr(i,1,2*n){ int x,y,z; cin >> x >> y >> z; a[i]={x,y,z}; } } namespace sub1 { void process() { cout << "YES"; } } void time() {cerr<< endl<<"Luattapcode: "<<clock()<<"ms"<<endl;} main() { ios_base::sync_with_stdio(NULL);cin.tie(NULL);cout.tie(NULL); #define TASK "qn" if(fopen(TASK".INP","r")) { freopen(TASK".INP", "r", stdin); freopen(TASK".OUT", "w", stdout); } int mtt=0; int test=1; if(mtt) cin>>test; while(test--) { read(); sub1::process(); } time(); return 0; }

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

tug.cpp:48:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
   48 | main()
      | ^~~~
tug.cpp: In function 'int main()':
tug.cpp:54:16: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)' declared with attribute 'warn_unused_result' [-Wunused-result]
   54 |         freopen(TASK".INP", "r", stdin);
      |         ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
tug.cpp:55:16: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)' declared with attribute 'warn_unused_result' [-Wunused-result]
   55 |         freopen(TASK".OUT", "w", stdout);
      |         ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...