Advertisement
Guest User

Untitled

a guest
Dec 11th, 2019
130
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.10 KB | None | 0 0
  1. #include<bits/stdc++.h>
  2. #define fs ios_base::sync_with_stdio (0); cin.tie(0)
  3. #define por(i,a,b) for(ll i=a;i<b;i++)
  4. #define fp(ch) freopen(ch,"r",stdin)
  5. #define ll long long
  6. #define pb(x) push_back(x)
  7. #define S second
  8. #define f first
  9. #define N 100005
  10. #define OO 1000000000000000000
  11. #define mod 1000000007
  12. #define pi acos(-1)
  13. #define EPS 0.000000001
  14. using namespace std;
  15.  
  16.  
  17.  
  18. int main(){
  19. fs;
  20. ll n,x=-1,moves=0;
  21. cin>>n;
  22. ll t[n];
  23. map<ll,ll> m;
  24. por(i,0,n){
  25. cin>>t[i];
  26. m[t[i]]++;
  27. if(m[t[i]]>2){
  28. cout<<"cslnb";
  29. return 0;
  30. }
  31. if(m[t[i]]==2){
  32. if(x!=-1 || t[i]==0){
  33. cout<<"cslnb";
  34. return 0;
  35. }else{
  36. moves++;
  37. t[i]--;
  38. x=t[i];
  39. }
  40. }
  41. }
  42. if(m[x]){
  43. cout<<"cslnb";
  44. return 0;
  45. }
  46. sort(t,t+n);
  47. //por(i,0,n) cout<<t[i] <<" ";cout<<endl;
  48. por(i,0,n){
  49. moves+=(t[i]-i);
  50. }
  51. if(moves%2) cout<<"sjfnb";
  52. else cout<<"cslnb";
  53. return 0;}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement