제출 #1126380

#제출 시각아이디문제언어결과실행 시간메모리
1126380monaxia비밀 (JOI14_secret)C++20
컴파일 에러
0 ms0 KiB
#include <bits/stdc++.h> #define pb push_back #define ppb pop_back #define fr first #define sc second #define all(v) v.begin(), v.end() #define mod (long long)(1e9 + 7) #define eps (long long)(1e-9) #define vektor vector #include "secret.h" using namespace std; using ll = long long; using ull = unsigned long long; using ld = long double; const ull Mod = 1e9 + 7; // int Secret(int l, int r){ // return (l ^ r); // } int n, timer = 0; vector <int> st(4e3 + 5, 0); void build(int idx, int l, int r, vector <int>& a){ if(l == r){ st[idx] = a[l]; return; } int mid = (l + r) >> 1; build(idx * 2, l, mid, a); build(idx * 2 + 1, mid + 1, r, a); st[idx] = Secret(st[idx * 2], st[idx * 2 + 1]); } int query(int idx, int l, int r, int u, int v){ if(u <= l && r <= v) return st[idx]; int mid = (l + r) >> 1; int ans = 0; bool left = (mid <= v) ? 1 : 0, right = (mid >= l) ? 1 : 0; if(left && right) ans = Secret(query(idx * 2, l, mid, u, v), query(idx * 2 + 1, mid + 1, r, u, v)); if(left && !right) ans = query(idx * 2, l, mid, u, v); if(!left && right) ans = query(idx * 2 + 1, mid + 1, r, u, v); return ans; } void Init(int N, int trash[]){ n = N; vector <int> a(n + 5, 0); for(int i = 1; i <= n; i ++){ a[i] = trash[i - 1]; } build(1, 1, n, a); } int Query(int l, int r){ return query(1, 1, n, l, r); } void solve(){ // int n1; // cin >> n1; // int a1[n]; // for(int i = 0; i < 5; i ++) cin >> a1[i]; // Init(n1, a1); // cout << Query(181, 362); } signed main() { cin.tie(0)->sync_with_stdio(0); // if(fopen("nameholder.inp", "r")){ // freopen("nameholder.inp", "r", stdin); // freopen("nameholder.out", "w", stdout); // } // cout << 1; return 0; ll n = 1; // cin >> n; while(n) { solve(); n --; cout << "\n"; } // cerr << "Time elapsed: " << 1.0 * clock() / CLOCKS_PER_SEC << " s.\n"; return 0; } // ++++ // ++++-::......:--:::-=+++ // ++++=:............---.....--:..:=++++++ // +++++++::......................::=+++++ // @@ ++++++++++:+++++++++ // @% @* // %%@@ *****#*@@ // %%%%% @##**##***% // @@@@@@+-*#*@ #####%+*##*@ // %#+@%%@@@ ##-%:::-#*###@@ // =====:*::: ###-:==::=#*%* // -====:::::+@@%@@%@#*--=*#%%#@%@ @%@ // @=====%=-@%=:::.:+-::::+::::::::::::%-----%% @@@@@ // @@%#*@++%===+::-================@%@@@@+++++++@@@%%%@#%###% // @#***#@@ @##=%@===+--:+==+===+%*##@%%%@@@@@@@@@@:= @%@%%%@#%% // -@ @*#@ #####%:::-====+:::==---**%#@ *%%%%@@@@@@-: // -=-*% # #***--%%::::::::+=-+#-----=**@*# #+**#@# // ----=----#+****=----=*#@=::::::=#-----------***%*% // ------------%*****##=@==::::::+%-----------***%** // +-----------------*@++%::::::::-----------****@*# // =------------% @%=+%#+:::::::* #-----*--**** ** // ----%--% *==+++++=+=##*:% ---=--**** ** // %@@@@@@@@@==@+%%%%@ ----**** *# // @=*+%@@@%@@=++=:%:::% #***@@# // #+++++++++#==++-:::::: @**** *# // =+++++++++++==+++::::::: ####@ #% // +++++++++++=@ @++++::::::@ @# // @+++++++++=@ =*++=:::::@ // ++++++++@ @++++::::: // ++++++= =++++::: // =+++++@ =+++:::: // ++++++-@ =+++:+:: // @::+::::@ =++::-::: // +::=::::: @+*+:-+++-: // @::+-:::::# +++::::::@ // ::%=:::::::%@ @%++::::*** // @:+@*:::::::****@ +@+++:-=*:*@ // *:@@%::::::::=**** @%@+++:::#**@ // *%@@@-:::::::%=+==*@ +@%+++:***+* // #%@@%%::::::::#+=-=# =+@+++++:::*+ // @####+::::::::%+=@#%#=@ @**@@%=++::::@ // @ +:::::::::***#*@ @@###+=+=%@ +**#+=+*+:::- // =-:::::::%%%%@@ @#=*########%#+*%%+--@*+::% // +---%@ @@ =-:-**:# // %%%%% @+--*@ // @%%%%@ @%%%%% // @%%@@

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

/usr/bin/ld: /tmp/ccCUOiP1.o: in function `main':
grader.cpp:(.text.startup+0x0): multiple definition of `main'; /tmp/ccl8YmDI.o:secret.cpp:(.text.startup+0x0): first defined here
collect2: error: ld returned 1 exit status