제출 #959856

#제출 시각아이디문제언어결과실행 시간메모리
959856ramalzaherBliskost (COI23_bliskost)C++14
0 / 100
0 ms348 KiB
#include <bits/stdc++.h> #include<ext/pb_ds/assoc_container.hpp> using namespace std; //typedef tree<int, null_type, less<int>, rb_tree_tag, tree_order_statistics_node_update > ordered_set ; #define int long long #define F first #define S second #define rep(i , j , n ) for(int i = j ;i < n; i++ ) #define FOR(i , n ) rep(i ,0 , n ) #define sz size() #define pb push_back #define all(x) x.begin() , x.end() #define vi vector<int> #define yes cout<<"YES\n"; #define no cout<<"NO\n"; #define cans cout<<ans<<endl; #define forx(i, x) for(auto i : x) #define fast #define pii pair<int ,int > #define endl "\n" #define sp ' ' const int N = 300 ; const int inf = 1e15 ; //int rec(int a , int b , int c, int d ){ //if(a+b+c+d == 0 ) //return 1 ; //int ans = 0 ; //if( ((a%2)^(2 * ( b%2 ) ) ^( 3 * (c%2 ) ) ^(4 * ( d%2 ) )) == 0 ) { //ans = 1 ; //} // if(a)ans += rec(0 , b , c , d ) ; // if(b)ans += rec(a , 0 , c , d ) ; // if(c)ans += rec(a , b , 0 , d ) ; // if(d)ans += rec(a , b , c , 0 ) ; // return ans ; // //} main() { int n , q ; cin>> n >> q ; string s , s1 ;cin>> s >> s1 ; FOR(i , n-1 ) { if(s1[i] > s[i]){ int temp = s1[i]-s[i] ; s[i]= char(s[i]+temp) ; s[i+1] = char(s[i+1]+temp) ; }else{ int temp = s[i]-s1[i] ; s[i] = char( (s[i]-temp) ) ; s[i+1] = char( ( s[i+1]-temp) ) ; } //cout<<s<<endl; } if(s==s1)cout<<"da\n"; else cout<<"ne\n"; return 0 ; }

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

Main.cpp:39:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
   39 | main()
      | ^~~~
#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...