제출 #320356

#제출 시각아이디문제언어결과실행 시간메모리
320356daringtriflesCoins (IOI17_coins)C++17
0 / 100
3 ms1272 KiB
//control+option+n to run! #include <bits/stdc++.h> using namespace std; #define pb push_back #define ll long long #define pll pair<ll, ll> #define FOR(i, a, b) for (signed long long i = (signed long long)(a); i < (signed long long)(b); i++) #define NEGFOR(i, a, b) for (ll i = (a); i > (b); i--) #define vll vector<long long> #define sll set<long long> #define ld long double #define inf 1000000000000000000 #define mll multiset<long long> #define vpll vector<pll> #define nn << "\n" #define ss << " " #define F(i, b) for (ll i = 0; i < b; i++) //10^8 operations per second //greatest int is 2,147,483,647 //greates long long is 9.22337204e18 //ALL FUNCTIONS SHOULD BE LL!!!! vector<int> coin_flips(vector<int> b, int c){ ll x=-1; FOR(i,0,b.size()){ if (x==-1&&b[i]) x==i; if (x!=-1 && b[i]) x^=i; } vector <int> v(1); v[0]=c^x; } int find_coin(vector<int> b){ ll x=-1; FOR(i,0,b.size()){ if (x==-1&&b[i]) x==i; if (x!=-1 && b[i]) x^=i; } return x; }

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

coins.cpp: In function 'std::vector<int> coin_flips(std::vector<int>, int)':
coins.cpp:26:27: warning: statement has no effect [-Wunused-value]
   26 |         if (x==-1&&b[i]) x==i;
      |                          ~^~~
coins.cpp:31:1: warning: no return statement in function returning non-void [-Wreturn-type]
   31 | }
      | ^
coins.cpp: In function 'int find_coin(std::vector<int>)':
coins.cpp:36:27: warning: statement has no effect [-Wunused-value]
   36 |         if (x==-1&&b[i]) x==i;
      |                          ~^~~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...