結果

問題 No.2350 Four Seasons
ユーザー arafathq9arafathq9
提出日時 2023-06-16 21:22:14
言語 C++17
(gcc 12.3.0 + boost 1.83.0)
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 13,503 bytes
コンパイル時間 3,474 ms
コンパイル使用メモリ 229,964 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-06-24 12:50:15
合計ジャッジ時間 4,073 ms
ジャッジサーバーID
(参考情報)
judge4 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
6,816 KB
testcase_01 AC 2 ms
6,944 KB
testcase_02 AC 2 ms
6,944 KB
testcase_03 AC 2 ms
6,940 KB
testcase_04 AC 2 ms
6,944 KB
testcase_05 AC 2 ms
6,940 KB
testcase_06 AC 2 ms
6,940 KB
testcase_07 AC 2 ms
6,940 KB
testcase_08 AC 2 ms
6,944 KB
testcase_09 AC 2 ms
6,940 KB
testcase_10 AC 2 ms
6,940 KB
testcase_11 AC 2 ms
6,944 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

                                    /*
                                    █████  ██████   █████  ███████  █████  ████████ ██   ██ 
                                    ██   ██ ██   ██ ██   ██ ██      ██   ██    ██    ██   ██ 
                                    ███████ ██████  ███████ █████   ███████    ██    ███████ 
                                    ██   ██ ██   ██ ██   ██ ██      ██   ██    ██    ██   ██ 
                                    ██   ██ ██   ██ ██   ██ ██      ██   ██    ██    ██   ██
                                    ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
                                    ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣀⡤⠶⠚⠋⠉⠉⠁⣀⡤⠤⣤⣀⠀⠀⠈⠉⣉⣽⢶⠶⢦⣀⣀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
                                    ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣀⡴⠖⠋⠁⠀⠀⠀⠀⠀⣴⠟⠉⠀⠀⠀⣈⣿⣦⡀⣼⠿⣇⣀⡀⠀⠈⠛⢿⠦⣄⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀
                                    ⠀⠀⠀⠀⠀⠀⠀⠀⢀⡴⠞⠉⠀⠀⠀⠀⠀⠀⠀⠀⡾⠁⠀⢀⣠⠶⠛⠉⠀⠈⢷⣿⠀⠀⠉⠙⠲⠦⣄⣈⢧⠈⠙⢦⡀⠀⠀⠀⠀⠀⠀⠀
                                    ⠀⠀⠀⠀⠀⠀⢀⡴⠋⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣰⣇⡴⠞⠉⠀⠀⠀⠀⢀⠀⠸⣿⡄⠀⠀⠀⠀⠀⠀⠙⢻⣧⠀⠀⠙⢦⡀⠀⠀⠀⠀⠀
                                    ⠀⠀⠀⠀⠀⣰⠏⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢿⡄⠀⠀⠀⠀⠀⠀⣴⣿⣷⣴⣿⢶⣄⠀⢀⣤⠀⠀⠀⠀⣿⠀⠀⠀⠀⠙⢦⠀⠀⠀⠀
                                    ⠀⠀⠀⢀⡼⠃⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣀⣀⡴⣷⠀⠀⠀⠀⠀⠀⢽⣿⣿⣿⡟⣦⣉⡛⠋⠁⠀⠀⠀⢀⡿⠶⢦⣀⡀⠀⠈⢧⡀⠀⠀
                                    ⠀⠀⢀⡼⠁⠀⠀⠀⠀⠀⠀⠀⠀⢀⡤⠶⠋⠉⠀⠀⠈⠷⣀⠀⠀⠀⠀⠀⣠⣾⣿⠟⠉⠉⠉⠳⣄⣀⣀⡤⠞⠁⠀⠀⠈⠙⠲⣄⠈⢳⡀⠀
                                    ⠀⠀⣼⠃⠀⠀⠀⠀⠀⠀⠀⣠⠖⠋⠀⠀⠀⠀⠀⠀⠀⠀⠉⠉⠒⠒⠒⠚⠉⢱⡃⠀⠀⠀⠀⠀⢹⡆⠀⠀⠀⠀⠀⠀⠀⠀⠀⢈⡳⡜⣇⠀
                                    ⠀⢰⠇⠀⠀⠀⠀⠀⠀⢀⡾⠁⠛⠒⠶⠶⠤⢄⣀⣀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⣧⡀⠀⠀⠀⢀⡾⠃⠀⠀⠀⠀⣀⣠⠤⠶⠒⠙⠁⠹⣾⡆
                                    ⠀⡼⠀⠀⠀⠀⠀⠀⢰⠏⠀⠀⠀⠀⠀⠀⠀⠀⠀⠉⠉⠑⠲⠶⡄⠀⠀⠀⠀⠀⠈⠙⠶⡶⠶⠋⠀⠀⠀⠶⠞⠉⠁⠀⠀⠀⠀⠀⠀⠀⢹⡇
                                    ⢠⡇⠀⠀⠀⠀⠀⢠⡏⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⡀⠀⠀⠀⠀⠀⠀⠀⠀⡇⠀⠀⠀⠀⠀⣤⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠸⡇
                                    ⢸⡇⠀⠀⠀⠀⠀⡼⠀⠀⠀⠰⠶⠒⠒⠒⠒⠒⠒⠒⠒⠒⠒⠚⠁⠀⠀⠀⠀⠀⠀⠀⠀⡇⠀⠀⠀⠀⠀⠉⠉⠉⠉⠉⠉⠉⠉⠉⠉⠁⠀⡇
                                    ⢸⡇⠀⠀⠀⠀⢰⡇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⡀⠀⠀⠀⠀⠀⠀⠀⠀⡇⠀⠀⠀⠀⢠⣄⣀⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⡇
                                    ⢸⣇⠀⠀⠀⠀⣼⡇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣀⣠⠴⠾⠁⠀⠀⠀⠀⠀⠀⠀⠀⡇⠀⠀⠀⠀⠀⠀⠉⠉⠙⠒⠶⠤⣄⣀⡀⠀⢰⡇
                                    ⠘⢹⡄⠀⠀⠀⢿⡇⠀⠀⠀⠀⠀⢀⣀⡠⠴⠖⠊⠉⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⡇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠉⠁⣸⠁
                                    ⠀⠘⣇⠀⠀⠀⢸⡇⠀⠀⠀⠾⠊⠉⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣀⣠⠴⠶⠞⠳⢦⣀⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢰⠇⠀
                                    ⠀⠀⠹⣆⠀⠀⠈⢳⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣀⡤⠶⠚⠉⠁⠀⠀⠀⠀⠀⠀⠈⠙⠲⢤⡀⠀⠀⠀⠀⠀⠀⠀⠀⢠⡏⠀⠀
                                    ⠀⠀⠀⠹⣆⠀⠀⠸⣇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣀⡤⠖⠉⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠙⠲⣄⠀⠀⠀⠀⠀⣠⠏⠀⠀⠀
                                    ⠀⠀⠀⠀⠸⣆⠀⠀⠹⡆⠀⠀⠀⠀⠀⠀⣀⡴⠚⠉⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠳⠀⠀⠀⣰⠏⠀⠀⠀⠀
                                    ⠀⠀⠀⠀⠀⠈⢳⡄⠀⠹⣆⠀⠀⠀⠀⠈⠋⠀⠀⠀⢀⣀⣀⡀⠀⠀⠀⠀⠀⠀⠀⣀⣠⠤⠴⠶⠶⠶⠶⠶⠦⢤⣀⡀⣠⠞⠁⠀⠀⠀⠀⠀
                                    ⠀⠀⠀⠀⠀⠀⠀⠙⢦⣀⣘⣦⣀⣀⣀⡤⠴⠒⠋⠉⠉⠉⠉⠉⠉⠓⠶⠦⣠⡶⠋⠉⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠉⠛⢦⡀⠀⠀⠀⠀⠀
                                    ⠀⠀⠀⠀⠀⠀⠀⠸⣏⠉⠉⢉⡿⠋⠉⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠙⠶⣄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠙⣆⠀⠀⠀⠀
                                    ⠀⠀⠀⠀⠀⠀⠀⠀⢻⠉⠉⠉⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠳⡄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣸⡀⠀⠀⠀
                                    ⠀⠀⠀⠀⠀⠀⠀⠀⢸⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣹⢦⣀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣼⠁⠀⠀⠀
                                    ⠀⠀⠀⠀⠀⠀⠀⠀⢸⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣤⠞⠁⠀⠈⠓⠦⣄⡀⠀⠀⠀⠀⠀⢀⣸⠏⠀⠀⠀⠀
                                    ⠀⠀⠀⠀⠀⠀⠀⠀⡼⠀⠀⠀⠶⣄⣀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣀⡤⠖⠉⠀⠀⠀⠀⠀⠀⠀⠈⠉⠓⠶⡶⣶⠶⠚⠁⠀⠀⠀⠀⠀
                                    ⠀⠀⠀⠀⠀⠀⠀⠀⡇⠀⠀⠀⠀⠈⠉⢹⠓⠶⠶⠶⡦⠴⣶⠶⠖⠚⠉⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢿⣾⠀⠀⠀⠀⠀⠀⠀⠀
                                    ⠀⠀⠀⠀⠀⠀⠀⢰⡇⠀⠀⠀⠀⠀⠀⣿⠀⠀⠀⠀⣖⠛⠛⠋⠉⠉⠉⠉⠉⠉⠉⠉⠉⠉⠓⠒⠒⠒⠒⠶⠶⡆⢸⡿⠀⠀⠀⠀⠀⠀⠀⠀
                                    ⠀⠀⢀⣀⣀⠀⠀⢸⡇⠀⠀⠀⠀⠀⠀⣿⠀⠀⠀⠀⣷⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⡇⢸⡇⠀⠀⠀⠀⠀⠀⠀⠀
                                    ⢠⡶⠋⠙⠉⠛⢦⣸⡇⠀⠀⠀⠀⠀⠀⠁⣷⠀⠀⠀⢻⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣸⠃⣼⡇⠀⠀⠀⠀⠀⠀⠀⠀
                                    ⣿⡇⠀⠀⠀⠰⢾⡿⡇⠀⠀⠀⠀⠀⠀⠀⠘⣧⠀⠀⠀⠻⣄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣴⠃⣠⢿⡇⠀⠀⠀⠀⠀⠀⠀⠀
                                    ⠹⣇⡆⠀⠀⢠⡼⠇⡇⠀⠀⠀⠀⠀⠀⠀⠀⠈⠳⣄⠀⠀⠉⠳⢤⣀⡀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣀⡴⠞⢁⡴⠃⣸⠀⠀⠀⠀⠀⠀⠀⠀⠀
                                    ⠀⠈⠛⠒⠒⠋⠀⠀⣿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠳⢄⣀⠀⠀⠉⠉⠉⠒⠒⠒⠒⠒⠚⠉⠉⢁⣠⠴⠋⠀⠀⡿⠀⠀⠀⠀⠀⠀⠀⠀⠀
                                    ⠀⠀⠀⠀⠀⠀⠀⠀⢹⡇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠉⠙⠲⠶⠤⠤⣤⣤⣤⠤⠤⠶⠶⠚⠉⠁⠀⠀⠀⢰⠃⠀⠀⠀⠀⠀⠀⠀⠀⠀
                                    ⠀⠀⠀⠀⠀⠀⠀⠀⠀⣧⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣴⠛⠉⠙⠗⠀⠀⠀⠀⠀⠀⠀⠀⣿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
                                    ⠀⠀⠀⠀⠀⠀⠀⠀⢠⡾⠧⢄⣀⣀⣀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣰⣇⣀⣀⡀⠀⠀⠀⠀⠀⠀⠀⡀⢀⣧⣀⡀⠀⠀⠀⠀⠀⠀⠀⠀
                                    ⠀⠀⠀⠀⠀⠀⠀⣴⠋⠀⠀⠀⠀⠈⠉⠉⠉⠉⠒⠒⠒⠒⠒⠒⠒⠒⠊⠉⠻⣏⠉⠉⠉⠉⠉⠉⠉⠉⠉⠉⠉⠁⠀⠉⠳⡄⠀⠀⠀⠀⠀⠀
                                    ⠀⠀⠀⠀⠀⠀⢰⣇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢹⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿⠀⠀⠀⠀⠀⠀
                                    ⠀⠀⠀⠀⠀⠀⠘⣏⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣼⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣰⠟⠀⠀⠀⠀⠀⠀
                                    ⠀⠀⠀⠀⠀⠀⠀⠈⠳⢤⣀⣀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣀⡴⠋⠉⠒⠲⠶⠦⠤⠤⠤⠤⠤⠤⠶⠖⠚⠁⠀⠀⠀⠀⠀⠀⠀
                                    ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠉⠉⠉⠉⠒⠒⠒⠶⠶⠶⠶⠶⠶⠒⠒⠉⠉⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
                                    */
#include<bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace std;
#define ll long long
#define ld long double
#define vi vector<int>
#define vll vector<long long>
#define pii pair<int,int>
#define gcd __gcd
#define S string 
#define inf 1e18
#define minf INT_MIN
#define lmax LLONG_MAX
#define  pb push_back
#define ff first
#define ss second
#define FAST ios_base::sync_with_stdio(false);
#define FAST_INPUT cin.tie(0);
#define FAST_OUTPUT cout.tie(0);
#define f(i,a,n) for(long long int i=a;i<n;i++)
#define g(i,a,n) for(long long int i=a;i>=n;i--)
#define w(t)  int t; cin>>t; f(case_num,1,t+1)
#define odd(n) (n&1)
#define even(n) !(n&1)
#define endl "\n"
#define all(x) x.begin(),x.end()
#define yes()  cout<<"YES"<<endl 
#define no()   cout<<"NO"<<endl
#define no1() cout<<-1<<endl
#define ans(case_num,ans)cout<< "Case #" << case_num << ": " << ans << endl;
const int N=1e5+5;
#define Mod 1000000007
#define mod 998244353
//calculating factorial of a number
ll factorial(ll n)
{
    ll answer=1;
    while(n--)
    {
        answer*=n+1;
        answer%=Mod;
    }
    return answer;
}
//power of two numbers using binary exponentiation
ll power(ll a,ll b)
{
    if(b==0)
    return 1;
    ll res=power(a,b/2);
    if(odd(b))
    {
         return (a%Mod*res%Mod*res%Mod)%Mod;
    }
    else 
    {
        return (res%Mod*res%Mod)%Mod;
    }
}
//Modulo inverse of a number
ll modulo_inverse(ll n)
{
    return power(n,Mod-2);
}
//combinatorics formula
ll ncr(ll n,ll r)
{
     if (r==0 || n==0)
     {
         return 1;
     }
    ll fac[n+1];
    fac[0]=1;
    f(i,1,n+1)
    {
        fac[i]=(fac[i-1]*i)%Mod;
    }
    
    return (fac[n]*modulo_inverse(fac[r])%Mod*modulo_inverse(fac[n-r])%Mod)%Mod;
}
//number of digits in a number
ll digits(ll n)
{
    ll ct=0;
    while(n)
    {
        ct++;
        n/=10;
    }
    return ct;
}
//number of digits in binary form
ll b_digits(ll n)
{
    if(!n)
    {
        return 1;
    }
    ll ct=0;
    while(n)
    {
        ct++;
        n/=2;
    }
    return ct;
}
//primes using seive upto 1e5
vector<ll> seive()
{
   vector<bool>isprime(N,true);
    isprime[0]=isprime[1]=false;
    f(i,2,N+1)
    {
        if(isprime[i])
      {
            for(ll j=2*i;j<=N;j+=i)
         {
             isprime[j]=0;
         }
      }  
    }
    vector<ll> prime;
    f(i,2,N+1)
    {
        if(isprime[i])
        {
            prime.pb(i);
        }
    }
    return prime;
}
//bit array for the fenwick tree
ll bit[N]={0};
//fenwick tree update
void fenwick(ll ind,ll x,ll n)
{
    for(;ind<=n;ind+=(ind&(-ind)))
    {
         bit[ind]+=x;
    }
}
//fenwick tree retrieval
ll fenwick_sum(ll ind1)
{
    ll i=ind1;
    ll ans=0;
    while(i)
    {
       ans+=bit[i];
       i-=(i&(-i));
    }
    return ans;
}
  ll segment_tree[N]={0};
void build(ll ind,ll start,ll end,vll &v)
{
    if(start==end)
    {
        segment_tree[ind]=v[end-1];
        return;
    }
    ll mid=(start+end)/2;
     build(2*ind,start,mid,v);
     build(2*ind+1,mid+1,end,v);
     segment_tree[ind]=min(segment_tree[2*ind],segment_tree[2*ind+1]);
}
ll an(ll ind,ll a,ll b,ll x,ll y)
{
    if(x<a&&y<a||x>b&&y>b)
    {
        return inf;
    }
    if(a>=x&&b<=y)
    {
        return segment_tree[ind];
    }
    ll mid=(a+b)/2;
    ll p=an(2*ind,a,mid,x,y);
    ll q=an(2*ind+1,mid+1,b,x,y);
    return min(p,q);
}
void update(ll ind,ll start,ll end,ll x,ll u)
{
    if(x<start&&x<end||x>start&&x>end)
    {
        return;
    }
    if(x==start&&x==end)
    {
         segment_tree[ind]=u;
         return;
    }
    if(start==end)
    {
         return;
    }
     ll mid=(start+end)/2;
     update(2*ind,start,mid,x,u);
     update(2*ind+1,mid+1,end,x,u);
     segment_tree[ind]=min(segment_tree[2*ind],segment_tree[2*ind+1]);

}
//SIGMA N
ll sigma(ll n)
{
    return (n*(n+1))/2;
}
//SQUARE ROOT OF A NUMBER
ll sq(ll n)
{
    ll ans=0;
    ll i=0;
    ll j=sqrt(n)+4;
    while(i<=j)
    {
        ll mid=i+(j-i)/2;
        if(mid*mid>n)
        {
            j=mid-1;
        }
        else 
        {
            i=mid+1;
            ans=mid;
        }
    }
    return ans;
}
//SUM OF DIGITS
ll sum(ll n)
{
    ll ct=0;
    while(n)
    {
        ct+=(n%10);
        n/=10;
    }
    return ct;
}
int main()
{
	FAST;
	FAST_INPUT;
	FAST_OUTPUT;
  ll x;
  cin>>x;
  if(x>=3&&x<=5)
  {
     cout<<"spring";
  }
  else if(x>=6&&x<=8)
  {
     cout<<"summer";
  }
  else if(x>=9&&x<=11)
  {
     cout<<"fall";
  }
  else 
  {
     cout<<"winter";
  }
}
0