제출 #918686

#제출 시각아이디문제언어결과실행 시간메모리
918686vjudge1Coins (IOI17_coins)C++17
100 / 100
8 ms1740 KiB
#include<bits/stdc++.h> #include"coins.h" #include<ext/pb_ds/assoc_container.hpp> #include<ext/pb_ds/tree_policy.hpp> #define ll long long #define ld long double #define vl vector<ll> #define vi vector<int> #define pb push_back using namespace std; using namespace __gnu_pbds; typedef tree<ll, null_type, less<ll>, rb_tree_tag, tree_order_statistics_node_update> ordered_set; vi coin_flips(vi b, int c){ vi flips; int xr = c; for(int i = 0; i < b.size(); i++) { if(b[i] == 1) xr = (xr ^ i); } flips.pb(xr); return flips; } int find_coin(vi b) { int xr = 0; for(int i = 0; i<b.size(); i++) { if(b[i] == 1) xr = (xr ^ i); } return xr; }

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

coins.cpp: In function 'std::vector<int> coin_flips(std::vector<int>, int)':
coins.cpp:17:22: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   17 |     for(int i = 0; i < b.size(); i++) {
      |                    ~~^~~~~~~~~~
coins.cpp: In function 'int find_coin(std::vector<int>)':
coins.cpp:27:21: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   27 |     for(int i = 0; i<b.size(); 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...