제출 #986393

#제출 시각아이디문제언어결과실행 시간메모리
986393PyqeUnscrambling a Messy Bug (IOI16_messy)C++17
100 / 100
2 ms856 KiB
#include "messy.h" #include <bits/stdc++.h> using namespace std; long long nd; vector<int> restore_permutation(int n,int d,int d2) { long long i,j,r; string s=""; vector<int> sq; for(nd=0;1ll<<nd<n;nd++); for(i=0;i<n;i++) { s+="0"; sq.push_back(0); } for(i=nd-1;i+1;i--) { for(j=0;j<n;j++) { if(j>>i&1) { for(r=0;r<n;r++) { s[r]=(r==j||r>>i+1!=j>>i+1)+'0'; } add_element(s); } } } compile_set(); for(i=nd-1;i+1;i--) { for(j=0;j<n;j++) { for(r=0;r<n;r++) { s[r]=(r==j||sq[r]>>i+1!=sq[j]>>i+1)+'0'; } sq[j]|=check_element(s)<<i; } } return sq; }

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

messy.cpp: In function 'std::vector<int> restore_permutation(int, int, int)':
messy.cpp:28:22: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
   28 |      s[r]=(r==j||r>>i+1!=j>>i+1)+'0';
      |                     ~^~
messy.cpp:28:30: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
   28 |      s[r]=(r==j||r>>i+1!=j>>i+1)+'0';
      |                             ~^~
messy.cpp:41:25: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
   41 |     s[r]=(r==j||sq[r]>>i+1!=sq[j]>>i+1)+'0';
      |                        ~^~
messy.cpp:41:37: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
   41 |     s[r]=(r==j||sq[r]>>i+1!=sq[j]>>i+1)+'0';
      |                                    ~^~
#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...