제출 #228395

#제출 시각아이디문제언어결과실행 시간메모리
228395kimbj0709Ispit (COCI19_ispit)C++14
90 / 90
189 ms2760 KiB
#include<bits/stdc++.h> using namespace std; #define int long long #define maxn 505 int32_t main() { ios::sync_with_stdio(0); cin.tie(0);cout.tie(0); int no_of_input; int arr[maxn][maxn]; int kk; cin >> no_of_input >> kk; vector<int> can(maxn,0); char input; for(int i=0;i<no_of_input;i++){ for(int j=0;j<no_of_input;j++){ cin >> input; arr[i][j] = input; } } for(int i=0;i<no_of_input;i++){ for(int j=i+1;j<no_of_input;j++){ int cnt = 0,mini = INT_MAX,maxi = INT_MIN; for(int k=0;k<no_of_input;k++){ if(arr[i][k]!=arr[j][k]){ cnt++; mini = min(mini,k); maxi = max(maxi,k); } } vector<int> temp(27,0); vector<int> temp2(27,0); if(mini==INT_MAX&&maxi==INT_MIN){ cout << "DA"; return 0; } if(maxi-mini+1<=kk){ for(int a=mini;a<=maxi;a++){ temp[arr[i][a]-'a']++; temp2[arr[j][a]-'a']++; } for(int a=0;a<temp.size();a++){ if(temp[a]!=temp2[a]){ goto cont; } } cout << "DA"; return 0; cont : ; } } } cout << "NE"; }

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

ispit.cpp: In function 'int32_t main()':
ispit.cpp:42:22: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
         for(int a=0;a<temp.size();a++){
                     ~^~~~~~~~~~~~
#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...
#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...