Submission #960485

#TimeUsernameProblemLanguageResultExecution timeMemory
960485IsamGeppetto (COCI15_geppetto)C++17
16 / 80
1065 ms596 KiB
#include<bits/stdc++.h> using namespace std; int n, m, ans; vector<int> tmp; map<pair<int, int>, bool> mp; signed main(){ ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0); cin >> n >> m; for(register int i = 1, u, v; i <= m; ++i){ cin >> u >> v; mp[{u, v}] = mp[{v, u}] = true; } for(register int mask = 0; mask < (1 << n); ++mask){ tmp.clear(); for(register int i = 1; i <= n; ++i){ if(mask & (1 << (i - 1))) tmp.emplace_back(i); } bool flag = true; for(auto to : tmp){ for(auto toto : tmp){ flag &= !mp[{to, toto}]; } } ans += flag; } cout << ans << '\n'; return 0; }

Compilation message (stderr)

geppetto.cpp: In function 'int main()':
geppetto.cpp:13:19: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
   13 |  for(register int i = 1, u, v; i <= m; ++i){
      |                   ^
geppetto.cpp:13:26: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
   13 |  for(register int i = 1, u, v; i <= m; ++i){
      |                          ^
geppetto.cpp:13:29: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
   13 |  for(register int i = 1, u, v; i <= m; ++i){
      |                             ^
geppetto.cpp:17:19: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
   17 |  for(register int mask = 0; mask < (1 << n); ++mask){
      |                   ^~~~
geppetto.cpp:19:20: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
   19 |   for(register int i = 1; i <= n; ++i){
      |                    ^
#Verdict Execution timeMemoryGrader output
Fetching results...