Submission #988391

# Submission time Handle Problem Language Result Execution time Memory
988391 2024-05-24T15:12:52 Z sam__in07 Karte (COCI15_karte) C++14
0 / 50
3 ms 600 KB
/*
⣿⣿⣿⣿⡿⠟⠛⠋⠉⠉⠉⠉⠉⠛⠛⠻⠿⢿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿
⣿⣿⠟⠈⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠀⠈⠙⠾⣿⣾⣿⣾⣿⣾⣿⣾⣿
⠋⡁⠀⠀⠀⠀⠀⢀⠔⠁⠀⠀⢀⠠⠐⠈⠁⠀⠀⠁⠀⠈⠻⢾⣿⣾⣿⣾⣟⣿
⠊⠀⠀⠀⠀⢀⠔⠃⠀⠀⠠⠈⠁⠀⠀⠀⠀⠀⠀⠆⠀⠀⠄⠀⠙⣾⣷⣿⢿⣿
⠀⠀⠀⠀⡠⠉⠀⠀⠀⠀⠠⢰⢀⠀⠀⠀⠀⠀⠀⢰⠀⠀⠈⡀⠀⠈⢿⣟⣿⣿
⠀⠀⢀⡜⣐⠃⠀⠀⠀⣠⠁⡄⠰⠀⠀⠀⠀⠀⠀⠐⠀⠀⠀⠰⠀⠀⠈⢿⣿⣿
⠀⢠⠆⢠⡃⠀⠀⠀⣔⠆⡘⡇⢘⠀⠀⠀⠀⠀⠀⠈⠀⠀⠀⠀⠀⠀⠀⠀⣿⣿
⢀⡆⠀⡼⢣⠀⢀⠌⢸⢠⠇⡇⢘⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠘⣿
⣼⣃⠀⠁⢸⢀⠎⠀⢸⠎⠀⢸⢸⡄⠀⠀⠀⠀⠀⠂⢀⠀⠀⠀⠀⠀⠀⠀⠀⣿
⠃⡏⠟⣷⣤⠁⠀⠀⠸⠀⠀⡾⢀⢇⠀⠀⠀⠀⠀⠄⠸⠀⠀⠀⠀⠄⠀⠀⠀⣿
⠀⠀⣀⣿⣿⣿⢦⠀⠀⠀⠀⡧⠋⠘⡄⠀⠀⠀⠀⡇⢸⠀⠀⠠⡘⠀⠀⠀⢠⣿
⠈⠀⢿⢗⡻⠃⠀⠀⠀⠀⠀⠀⠀⠀⠱⡀⠀⠀⢰⠁⡇⠀⠀⢨⠃⡄⢀⠀⣸⣿
⠀⠀⠀⠈⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣀⣱⠀⠀⡎⠸⠁⠀⢀⠞⡸⠀⡜⢠⣿⣿
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢠⣺⣿⣧⢰⣧⡁⡄⠀⡞⠰⠁⡸⣠⣿⣿⣿
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠠⡿⠏⣿⠟⢁⠾⢛⣧⢼⠁⠀⠀⢰⣿⡿⣷⣿
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠉⠡⠄⠀⡠⣚⡷⠊⠀⠀⠀⣿⡿⣿⡿⣿
⡀⠀⠀⠀⠀⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⡠⠊⠁⢸⠁⠀⠀⠀⢰⣿⣿⡿⣿⣿
⠱⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⡠⠊⠀⠀⠀⡞⠀⠀⠀⠀⢸⣿⣷⣿⣿⣿    /*"kawaiiiiiii!!!!!!!!!!!"*\
⠀⠙⢦⣀⠀⠀⠀⠀⠀⢀⣀⣠⠖⠁⠀⠀⠀⠀⠀⡇⠀⠀⠀⠀⣸⣿⣾⡿⣷⣿
⠀⠀⠀⠀⠉⠉⣩⡞⠉⠁⠀⢸⡄⠀⠀⠀⠀⠀⢰⠇⠀⠀⠀⠀⣿⣿⣷⣿⣿⣿
⡆⠀⠀⣀⡠⠞⠁⣧⢤⣀⣀⣀⡇⠀⠀⠀⠀⠀⣸⠀⠀⠀⠀⠀⣿⣷⣿⣷⣿⣿
⣿⣷⠊⠁⠀⠀⡰⠁⠀⠀⠀⠀⣹⠶⢦⡀⠀⠀⡇⠀⠀⠀⠀⠀⢸⣿⣷⣿⣷⣿
⣿⢿⠀⠀⠀⡔⠁⠀⠀⠀⠀⠀⠀⠀⠀⠈⠳⡄⡇⠀⠀⠀⠀⠀⠈⣿⣾⣷⣿⣿
⠋⠈⠀⢀⠜⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⡀⠀⠈⣧⠀⠀⠀⠀⠀⠀⠻⣿⣽⣾⣿
⢀⡄⡠⠊⠀⠀⠀⠀⠀⠀⠀⠀⠀⡀⠁⠀⠀⠀⣸⠀⠀⠀⠀⠀⠀⠀⣿⣿⣻⣿
⣿⠋⠀⠀⠀⠀⠀⠀⠀⠀⢰⠀⠐⠀⠀⠀⠀⣀⡿⠀⠀⠀⠀⠀⠀⠀⢹⣿⣻⣿
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⡼⠀⠀⠀⠀⠀⢀⣃⡇⠀⠲⡀⠀⠀⠀⠀⠈⣿⡿⣿
⣀⠤⠤⠤⡀⠀⠀⠀⠀⡴⠃⠀⠀⠀⠀⠀⢬⠞⡇⠀⠀⠇⠀⠀⠀⠀⠀⣿⣿⣿
⡁⢀⠀⠀⡇⠀⠀⠀⡼⠁⠀⠀⠀⠀⠀⣸⠁⠀⠇⠀⠀⡇⠀⠀⠀⠀⠀⣿⣿⣿
⠔⠃⠀⠀⡇⠀⠀⡼⠁⠀⠀⠀⠀⠀⢀⡇⠀⠀⡃⠀⠀⠙⢄⠀⠀⠀⠀⣿⣷⣿
⠒⠊⠀⠀⢸⠀⣸⠃⠀⠀⠀⠀⠀⠀⡞⠀⠀⠀⢅⠀⠀⡂⠸⡄⠀⠀⠀⣿⣟⣿
⠓⠀⠉⠀⢸⣰⠃⠀⠀⠀⠀⠀⠀⡜⡆⠀⠀⠀⢸⠀⠀⡇⢀⠇⠀⠀⠀⣿⣿⣿
⠉⠁⠀⢠⠞⠀⠀⠀⠀⠀⠀⠀⣰⠁⡇⠀⠀⠀⡇⠀⠀⡇⢸⠀⠀⠀⠀⣿⣷⣿
⡀⠀⢀⢿⣥⡤⠤⠤⠤⣀⣀⢠⠇⠀⢸⠀⠀⢰⠁⠀⢨⠀⢸⠀⠀⠀ ⣿⣟⣿
*/
/*
/* writer  : chainsa_min *\
   time    :  20:45:34 

*/
#include<bits/stdc++.h>
using namespace std;
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace __gnu_pbds;
// hellow it's me .. "me ?" you beloved bastard_chao_min  :] and tnx to you  for reading my code 
#define ll                 long long 
#define maxi               1e17
#define MOD                1e9 + 7
#define pie                3.14159265358979323846264338327
#define nissan             for (i=0; i<n; i++)
#define skyline            for(i=1;i<=n;i++) 
#define AE86               for(i=0;i<n-1;i++)
#define Rx7                for(i=1;i<n;i++)  //Mazda RX-7 Savana.
#define in                 cin>>n
#define on                 string s
#define up                 cin >> s 
#define be(v)               v.begin(), v.end()//v(n)
#define sbe(v);              sort( v.begin(), v.end())//v(n)
// I just heard you found the one you've been looking
// You've been looking for
// I wish I would have known that wasn't me
#define mii                map<int,int>v;
#define mcl                 map<char,ll>
#define msl                map<string,ll>
#define emb                emplace_back
#define mpi                make_pair
#define seti               pair<ll,ll>
#define pub                push_back
#define vei                vector<int>
#define ves                vector<string>
#define vec                vector<char>
#define vpl                vector<seti>
#define deq                deque<ll> 
#define maxv(a,b)          (a)=max((a),(b)) // set a to the maximum of a and b
#define minv(a,b)          (a)=min((a),(b));
#define debv(v)            for(auto it : v) cout << it << " ";
#define deb(x)             cout << #x << " = " << x << " ";
#define vel                vector<ll>
#define bv2                bitset<14> b(v[i])//2^n = x n = 16 32 64 ......
#define b32                bitset<32> 
#define chifuyu            iota(v.begin(), v.end(), 1) 
#define mustano            accumulate(v.begin(), v.end(), 0LL)
#define sei                set<ll>
#define mappa              map<ll,ll>
#define sj7                ara[n]
#define supra              ara[i]
#define matsuno            nissan { cin >> ara[i] ;}   
#define dazai              nissan {cin >> v[i];} 
#define dbg(a)               cerr << __LINE__ << ": " << #a << " = " << a << '\n'
#define optimus_prime      vector<int>::iterator it 
#define flash              cout << *it << endlll // if(*it==n)  *it = x (x replacing n && sit on this place)
#define nsx_r              cin >> ara[i]
#define evo                n = s.size();
#define ash                  ll j ,  i,  n , m ,sums , a , b, c,d,  val_stor , val_stor1 , val_stro2 , val_stor3 , count_kor = 0 , k , sum = 0 , x , y, z , count_kor_1 = 0 
#define gtr                '\n'
// double sub_x = pow(x1 - x2, 2);
#define chainsaw           cout << "YES" <<gtr
#define vapub              nissan { cin >> x; v.pub(x);}
#define man                cout << "NO"<<gtr
#define se                 ' '
#define se2                " "
#define tithi             s.begin(), s.end() // dont think she my gf -;( she is mine own little sister -:} 
#define mitsuha_wifu      ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL)
#define kyouka_chan       freopen("input.txt", "r", stdin);freopen("output.txt", "w", stdout);
#define folafol(x)         cout << x << gtr ;
#define folafol_1(x,y)       cout << x << se2 << y ;
#define she(a,b,i)        for (ll i = a; i < b; i++)
#define her(a,b,i)        for (ll i = a; i <=b; i++)
#define bjt(a,b,i)        for(ll i = a ; i>=b ; i-- )
#define ss                second
#define println(x)         cout << x << gtr ;
#define folafol_2(x,y)       cout << x << "/" << y ;  cout << gtr ;
#define sayonara          return 0 
#define lancer_            ll  guts ; cin >> guts ; while(guts--)         
//---------------------------start---------------------------------          
// const int MOD = 1e9 + 7;      
//  double average = static_cast<double>(sum) / n;
//  sort(a(v), greater<ll>()); means  reverse(a(v)) ;
ll binarySearch(ll array[], ll x, ll low, ll high) {

  while (low <= high) {
    int mid = low + (high - low) / 2;

    if (array[mid] == x)
      return mid;

    if (array[mid] < x)
      low = mid + 1;

    else
      high = mid - 1;
  }

  return -1;
}
 
bool comp_are (seti a , seti b) {
  if(a.first==b.first){
    return a.second<b.second ;
  }
  else
 return  a.first > b.first;
}
bool comps (seti a , seti b) {
  if((a.first == b.first))
 return (a.second > b.second);
 else 
  return (a.first<b.first) ;
}
// for 2 pointer l = 0 r= n-1 \

ll tringle(ll a , ll b, ll c ) {
    if((a+b)>c && (b+c)>a  &&   (c+a)>b)
    {
       return  1 ;
       
    }
    else return 0 ; 
}
ll  segment (ll a , ll b, ll c ) {
    if((a+b)==c  || (b+c)==a ||  (c+a)==b)
    {
       return  1 ;
       
    }
    else return 0 ; 
}



ll N = 500;

int main (){  
   mitsuha_wifu ;
 // bool flag = 1 ; // true  
   #ifndef  ONLINE_JUDGE
      kyouka_chan ;
    #endif 
  
//lancer_   

   { 
   // ash , val ;  
 int n , i,j,t,nr;
      char s[2000];
    int v[5][20];
   
    cin.getline(s,1000);
    for(i=0;s[i];i+=3){
        if(s[i]=='P')t=1;

        else if(s[i]=='K')t=2;

        else if(s[i]=='H')t=3;

        else if(s[i]=='T')t=4;

        nr=(s[i+1]-'0')*10+s[i+2]-'0';

        if(v[t][nr]==1)
        {cout<<"GRESKA";
        return 0;
        }

        v[t][nr]=1;

    }

   
    her(1,4,i){
        n = 13;
        for(j=1;j<=13;j++)
            if(v[i][j])
            n--;
        cout<< n << se2 ;
    }
   }
     
   
return 0;
} 


 /*brian ' O conner  & mia >︿<*/

 
 //mappp  is here 
 /*
 // mappingn 
 for(auto x:ma)
  {
    cout<<x.first<<endl;
  }
  cout<<endl;

for(i=0;i<(2*n-1);i++)
{
  string s;cin>>s;
 // cout<<s<<endl;
  ma[s]++;  // map countinggggg
  //cout<<ma[s]<<endl;
}
for(auto x:ma)  {
  cout<<x.first << x.second<<endl;
if(x.second%2!=0)
cout << x.first ;
}
 */
 
 //     vector<int>::iterator it = max_element (a(v));

 



/*




 vel v = { 1,2,3,4,5,6,8,9,10}

   vel :: iterator it = lower_bound(a(v),6)

   cout << *it << endl;

  output => 8





*/












/*

seive of era.....
int is_prime[100000001] ;
void sieve(int n ) {

      int prime[n+3] ; memset(prime,0,sizeof(prime));
      for(int i = 0 ;i*i<=n ; i++) {
         if(prime[i]==0) {
           for(int j = i*i ;j<=n;j+=i) {
             prime[j] = 1 ;
           }
         }
      }
      for(int i = 2 ;i<=n ;i++) {
         if(prime[i]==0) cout << i << " ";
      }
       cout << endl ;
 }



 only primesd
  if(n<2) return 0; 
    if(n<=3) return 1; 
    if(n%2==0) return 0;

    for(i=3;i<sqrt(n);i+=2) {
         {
             if(n%i==0) return 0 ;
         }
         return 1 ;
    }




// ll gcd =  __gcd(a,b);
//     ll  lcm = (min_num / gcd) * max_num;


*/
 













Compilation message

karte.cpp:19:95: warning: "/*" within comment [-Wcomment]
   19 | ⠱⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⡠⠊⠀⠀⠀⡞⠀⠀⠀⠀⢸⣿⣷⣿⣿⣿    /*"kawaiiiiiii!!!!!!!!!!!"*\
      |                                    
karte.cpp:38:1: warning: "/*" within comment [-Wcomment]
   38 | /* writer  : chainsa_min *\
      |  
karte.cpp:152:1: warning: multi-line comment [-Wcomment]
  152 | // for 2 pointer l = 0 r= n-1 \
      | ^
karte.cpp: In function 'int main()':
karte.cpp:106:34: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)' declared with attribute 'warn_unused_result' [-Wunused-result]
  106 | #define kyouka_chan       freopen("input.txt", "r", stdin);freopen("output.txt", "w", stdout);
      |                           ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
karte.cpp:179:7: note: in expansion of macro 'kyouka_chan'
  179 |       kyouka_chan ;
      |       ^~~~~~~~~~~
karte.cpp:106:67: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)' declared with attribute 'warn_unused_result' [-Wunused-result]
  106 | #define kyouka_chan       freopen("input.txt", "r", stdin);freopen("output.txt", "w", stdout);
      |                                                            ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
karte.cpp:179:7: note: in expansion of macro 'kyouka_chan'
  179 |       kyouka_chan ;
      |       ^~~~~~~~~~~
karte.cpp:202:19: warning: 't' may be used uninitialized in this function [-Wmaybe-uninitialized]
  202 |         if(v[t][nr]==1)
      |            ~~~~~~~^
# Verdict Execution time Memory Grader output
1 Incorrect 2 ms 348 KB Output isn't correct
2 Incorrect 2 ms 348 KB Output isn't correct
3 Incorrect 2 ms 344 KB Output isn't correct
4 Incorrect 2 ms 348 KB Output isn't correct
5 Incorrect 2 ms 600 KB Output isn't correct
6 Incorrect 2 ms 348 KB Output isn't correct
7 Incorrect 3 ms 348 KB Output isn't correct
8 Incorrect 2 ms 348 KB Output isn't correct
9 Incorrect 2 ms 384 KB Output isn't correct
10 Incorrect 2 ms 344 KB Output isn't correct