답안 #1089217

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
1089217 2024-09-16T07:35:13 Z vjudge1 Growing Vegetable is Fun 3 (JOI19_ho_t3) C++17
0 / 100
0 ms 348 KB
#include <bits/stdc++.h>
using namespace std;
#define accepted ios_base::sync_with_stdio(0);cin.tie(0);
#define Daulbekov signed
#define Makan main
#define int long long
#define double long double
#define pb push_back
#define F first
#define S second
const long long N=5e5+10;
const long long MOD=1e9+7;
const long long INF=2e18;
int binpow(int a,int b){
	a%=MOD;
	if(b==0)return 1;
	if(b%2)return binpow(a,b-1)*a%MOD;
	else {
		int res=binpow(a,b/2);
		return res*res%MOD;
	}
}
bool cmp(pair<int,int>a,pair<int,int>b){
	if(a.F/300!=b.F/300)return a.F/300<b.F/300;
	return a.S<b.S;
}
int cnt[100];
Daulbekov Makan(){
//	freopen(".in","r",stdin);
//	freopen(".out","w",stdout);
	accepted
	string s;
	cin>>s;
	int n=s.size();
	for(int i=0;i<n;i++){
		cnt[s[i]]++;
	}
	if(cnt['Y']==n)cout<<-1;
}

Compilation message

joi2019_ho_t3.cpp: In function 'int main()':
joi2019_ho_t3.cpp:36:11: warning: array subscript has type 'char' [-Wchar-subscripts]
   36 |   cnt[s[i]]++;
      |           ^
# 결과 실행 시간 메모리 Grader output
1 Incorrect 0 ms 348 KB Output isn't correct
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 0 ms 348 KB Output isn't correct
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 0 ms 348 KB Output isn't correct
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 0 ms 348 KB Output isn't correct
2 Halted 0 ms 0 KB -