답안 #1019981

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
1019981 2024-07-11T11:44:21 Z Abito Homework (CEOI22_homework) C++17
0 / 100
27 ms 15168 KB
#include <bits/stdc++.h>
#define F first
#define S second
#define pb push_back
#define ppb pop_back
#define ep insert
#define endl '\n'
#define elif else if
#define pow pwr
#define sqrt sqrtt
#define int long long
#define ll long long
typedef unsigned long long ull;
using namespace std;
int32_t main(){
    ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL);
    string s;cin>>s;
    bool x=0,y=0;
    for (int i=0;i<s.size();i++){
        if (s[i]!='m') continue;
        if (s[i+1]=='i') x=1;
        else y=1;
    }
    cout<<x+y<<endl;
    return 0;
}

Compilation message

Main.cpp: In function 'int32_t main()':
Main.cpp:19:19: warning: comparison of integer expressions of different signedness: 'long long int' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   19 |     for (int i=0;i<s.size();i++){
      |                  ~^~~~~~~~~
# 결과 실행 시간 메모리 Grader output
1 Incorrect 0 ms 344 KB Output isn't correct
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 0 ms 344 KB Output isn't correct
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 27 ms 14116 KB Output is correct
2 Correct 21 ms 15168 KB Output is correct
3 Incorrect 22 ms 15144 KB Output isn't correct
4 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 0 ms 344 KB Output isn't correct
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 0 ms 344 KB Output isn't correct
2 Halted 0 ms 0 KB -