games *1800

Please click on ads to support us..

C++ Code:

#pragma GCC optimize("O3,unroll-loops")
#include<bits/stdc++.h>
#include<sstream>
using namespace std;
//#include <ext/pb_ds/assoc_container.hpp>
//#include <ext/pb_ds/tree_policy.hpp>
//using namespace __gnu_pbds;
//typedef tree<int,null_type,less_equal<int>,rb_tree_tag,tree_order_statistics_node_update> ordered_set;
const long long INF=1'000'000'000'000'000'000;
const int inf = 1'000'000'000;
const long long mod = 998'244'353;
const long long MOD = 1'000'000'007;
const int N = 200'002;
#define IOS ios_base::sync_with_stdio(false);cin.tie(0);
#define T() int tt; cin>>tt; while(tt--)
#define int long long
#define prec cout<<fixed<<setprecision(8);
#define ld long double  
#define pii pair<int, int>
#define pll pair<ll, ll>
#define pipi pair<int, pair<int, int>>
#define vii vector<int>
#define F first
#define S second
#define fill(v,p) memset(v, p, sizeof(v))
// #define print(v) for(auto &z : v)cout<<z<<" ";cout<<'\n';
#define all(v) v.begin(), v.end()
#define PI 3.141592653589793
#define set_bits __builtin_popcountll
#define sz(x) ((int)(x).size())
#define rank asdf
int n, a[N];
void solve(){
  cin>>n;
  for(int i = 0; i < n; i++){
    cin>>a[i];
  }
  sort(a, a+n);
  int cnt = 0, val = -1;
  if((n > 1) && (a[0] == 0) && (a[1] == 0)){
    cout<<"cslnb\n";
    return;
  }
  for(int i = 0; i < n-1; i++){
    if(a[i] == a[i+1])cnt++, val = a[i];
  }
  if(cnt > 1){
    cout<<"cslnb\n"; 
    return;
  }
  if(cnt == 1){
    auto it = lower_bound(a, a+n, val-1) - a;
    if(a[it] == val-1){
      cout<<"cslnb\n";
      return;
    }
  }
  int tot = accumulate(a, a+n, 0LL) - (n*(n-1))/2;
  if(tot&1){
    cout<<"sjfnb\n";
  } else{
    cout<<"cslnb\n";
  }

}
int32_t main()
{
  cin.tie(0) -> sync_with_stdio(false);
  solve();
}


Comments

Submit
0 Comments
More Questions

429A - Xor-tree
1675C - Detective Task
950A - Left-handers Right-handers and Ambidexters
672B - Different is Good
1C - Ancient Berland Circus
721A - One-dimensional Japanese Crossword
1715B - Beautiful Array
60B - Serial Time
453A - Little Pony and Expected Maximum
1715A - Crossmarket
1715C - Monoblock
1512C - A-B Palindrome
1679B - Stone Age Problem
402A - Nuts
792A - New Bus Route
221A - Little Elephant and Function
492C - Vanya and Exams
1369B - AccurateLee
892B - Wrath
999A - Mishka and Contest
727C - Guess the Array
1625C - Road Optimization
1715D - 2+ doors
267A - Subtractions
1582A - Luntik and Concerts
560A - Currency System in Geraldion
946A - Partition
1068B - LCM
1692E - Binary Deque
679A - Bear and Prime 100