/ SeriousOJ /

Record Detail

Accepted


  
# Status Time Cost Memory Cost
#1 Accepted 1ms 284.0 KiB
#2 Accepted 1ms 412.0 KiB
#3 Accepted 1ms 412.0 KiB
#4 Accepted 1ms 284.0 KiB
#5 Accepted 1ms 328.0 KiB
#6 Accepted 1ms 412.0 KiB
#7 Accepted 1ms 412.0 KiB
#8 Accepted 1ms 412.0 KiB
#9 Accepted 1ms 284.0 KiB
#10 Accepted 1ms 284.0 KiB
#11 Accepted 1ms 412.0 KiB

Code

/*CODED BY mahmudulsakib2019
  DATE:-06/3/2024;TIME:-07:39 pm
  BANGALDESH , SYLHET*/

#include <iostream>
#include <cmath>     ///mathematics
#include <vector>    ///array
#include <regex>     ///searching_prefix_suffix
#include <algorithm> ///finding_max_min_from_array
#include <string>    ///string_manipulation
#include <numeric>   ///findin total sum of an array
using namespace std;

int main() {
    string s;
    cin >> s;
    ///int count=0;
    string ch = "leadinguniversity";
    sort(s.begin(), s.end());
    sort(ch.begin(), ch.end());
    /*if(s.size()==ch.size()){
         for(int i=0;i<ch.size();i++){
            for(int j=0;j<s.size();j++){
              if(ch[i]==s[j]){
                count++;
              }
            }
         }
         if (count==17){
            cout<<"Leading University"<<endl;
         }
         else{
            cout <<"Impossible"<<endl;
         }
    }*/
    if(s == ch) {
        cout << "Leading University" << endl;
    } else {
        cout << "Impossible" << endl;
    }
    return 0;
}

Information

Submit By
Type
Submission
Problem
P1024 Rearrange Character
Contest
Brain booster #2
Language
C++20 (G++ 13.2.0)
Submit At
2024-03-06 13:47:36
Judged At
2024-03-06 13:47:36
Judged By
Score
100
Total Time
1ms
Peak Memory
412.0 KiB