Submission #1606302


Source Code Expand

#include <bits/stdc++.h>
using namespace std;

int main(){
    string s;
    cin>>s;
    set<char>f;
    set<char>::iterator ff;
    sort(s.begin(),s.end());
    for(long i=0;i<s.length();i++){
        f.insert(s[i]);
    }
//    long len=f.size();
 //   char sa=s[len-1];
    vector<char>g;
    vector<char>::iterator gg;
    for(char i='a';i<='z';i++){
        g.push_back(i);
    }
    long clock=0;
    gg=g.begin();
    ff=f.begin();
    while(gg!=g.end() && ff!=f.end()){
        if(*gg==*ff){
            clock++;
            gg++,ff++;
        }
        else if(*gg<*ff){
            gg++;
        }
        else ff++;
    }
    if(clock==g.size()) cout<<"None"<<endl;
    else{
        vector<long> z;
        vector<long>::iterator zz;
        vector<long>x;
        vector<long>::iterator xx;
        vector<long> y;
        vector<long>::iterator yy;
        for(ff=f.begin();ff!=f.end();ff++){
            z.push_back(*ff);
        }
      for(gg=g.begin();gg!=g.end();gg++){
          x.push_back(*gg);
      }
      long len=x.size()-z.size();
      for(xx=x.begin(),zz=z.begin();xx!=x.end(),zz!=z.end()+len;xx++,zz++){
        if(*xx!=*zz){
            y.push_back(*xx);
        }
      }
      char sg;
      for(yy=y.begin();yy!=y.end();yy++){
        sg=*yy;
        cout<<sg;
        exit(0);
      }
    }
    return 0;
}

Submission Info

Submission Time
Task B - Not Found
User sajol
Language C++14 (GCC 5.4.1)
Score 200
Code Size 1404 Byte
Status AC
Exec Time 8 ms
Memory 512 KB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 200 / 200
Status
AC × 3
AC × 15
Set Name Test Cases
Sample sample1.txt, sample2.txt, sample3.txt
All sample1.txt, sample2.txt, sample3.txt, 1.txt, 2.txt, 3.txt, 4.txt, 5.txt, 6.txt, 7.txt, 8.txt, 9.txt, sample1.txt, sample2.txt, sample3.txt
Case Name Status Exec Time Memory
1.txt AC 1 ms 256 KB
2.txt AC 1 ms 256 KB
3.txt AC 2 ms 256 KB
4.txt AC 8 ms 512 KB
5.txt AC 8 ms 512 KB
6.txt AC 8 ms 512 KB
7.txt AC 6 ms 512 KB
8.txt AC 8 ms 512 KB
9.txt AC 8 ms 512 KB
sample1.txt AC 1 ms 256 KB
sample2.txt AC 1 ms 256 KB
sample3.txt AC 1 ms 256 KB