Submission #1519771


Source Code Expand

#include <cstdio>
#include <algorithm>
#include <iostream>
#include <vector>

using namespace std;

int find1(string s){
  bool f=false;
  for(int i=0;i<s.size();i++){
    if(f&&s[i]=='W') return i;
    if(s[i]=='W') f=true;
    else f=false;
  }
  return -1;
}

int main(void){
  string s;
  cin>>s;
  int i;
  if(s.substr(find1(s),7)=="WBWBWBW"){
    switch(find1(s)){
    case 5:cout<<"Do";break;
    case 3:cout<<"Re";break;
    case 1:cout<<"Mi";break;
    }
  }
  else{
    switch(find1(s)){
    case 7:cout<<"Fa";break;
    case 5:cout<<"So";break;
    case 3:cout<<"La";break;
    case 1:cout<<"Si";break;
    }
  }
  cout<<endl;
  return 0;
}

Submission Info

Submission Time
Task C - ピアニスト高橋君
User hato_roll
Language C++14 (GCC 5.4.1)
Score 100
Code Size 691 Byte
Status AC
Exec Time 1 ms
Memory 256 KB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 100 / 100
Status
AC × 1
AC × 8
Set Name Test Cases
Sample example_0.txt
All example_0.txt, handmade_0.txt, handmade_1.txt, handmade_2.txt, handmade_3.txt, handmade_4.txt, handmade_5.txt, handmade_6.txt
Case Name Status Exec Time Memory
example_0.txt AC 1 ms 256 KB
handmade_0.txt AC 1 ms 256 KB
handmade_1.txt AC 1 ms 256 KB
handmade_2.txt AC 1 ms 256 KB
handmade_3.txt AC 1 ms 256 KB
handmade_4.txt AC 1 ms 256 KB
handmade_5.txt AC 1 ms 256 KB
handmade_6.txt AC 1 ms 256 KB