結果

問題 No.1799 Summer Day
ユーザー Digwee_kkknDigwee_kkkn
提出日時 2022-01-07 22:29:37
言語 C++14
(gcc 13.2.0 + boost 1.83.0)
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 2,784 bytes
コンパイル時間 1,478 ms
コンパイル使用メモリ 164,256 KB
実行使用メモリ 4,380 KB
最終ジャッジ日時 2023-08-09 03:24:47
合計ジャッジ時間 2,466 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
4,376 KB
testcase_01 AC 2 ms
4,376 KB
testcase_02 AC 2 ms
4,376 KB
testcase_03 AC 1 ms
4,376 KB
testcase_04 AC 2 ms
4,376 KB
testcase_05 AC 2 ms
4,380 KB
testcase_06 AC 1 ms
4,376 KB
testcase_07 AC 2 ms
4,380 KB
testcase_08 AC 1 ms
4,376 KB
testcase_09 AC 1 ms
4,380 KB
testcase_10 AC 2 ms
4,380 KB
testcase_11 AC 1 ms
4,380 KB
testcase_12 AC 1 ms
4,376 KB
testcase_13 AC 2 ms
4,380 KB
testcase_14 AC 2 ms
4,376 KB
testcase_15 AC 2 ms
4,376 KB
testcase_16 AC 1 ms
4,380 KB
testcase_17 AC 2 ms
4,376 KB
testcase_18 AC 2 ms
4,380 KB
testcase_19 AC 2 ms
4,380 KB
testcase_20 AC 2 ms
4,380 KB
testcase_21 AC 1 ms
4,376 KB
testcase_22 AC 2 ms
4,376 KB
testcase_23 AC 1 ms
4,380 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.cpp: 関数 ‘int main()’ 内:
main.cpp:31:4: 警告: ‘j’ may be used uninitialized [-Wmaybe-uninitialized]
   31 |    if(j>0){
      |    ^~
main.cpp:22:11: 備考: ‘j’ はここで定義されています
   22 |  ll n,s,v,j; cin>>n>>s; bl flag=false;
      |           ^

ソースコード

diff #

#include<bits/stdc++.h>
using namespace std; 
typedef long long ll;
typedef float fl;
typedef bool bl;
typedef string st;
typedef pair<int,int> P;
const int INF=100000000;
const ll INFx=1000000000000;
int dx[4]={1,0,-1,0};
int dy[4]={0,1,0,-1};
string fi="01234567890123456789";
string al="abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz";
string AL="ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ";
#define rep(i,n) for(int i=0;i<(n);++i)
#define YESNO(flag) if(flag){cout<<"YES"<<endl;}else{cout<<"NO"<<endl;}
#define yesno(flag) if(flag){cout<<"yes"<<endl;}else{cout<<"no"<<endl;}
#define YesNo(flag) if(flag){cout<<"Yes"<<endl;}else{cout<<"No"<<endl;}


int main(){
 ll n,s,v,j; cin>>n>>s; bl flag=false;
 if(n>1&&n<s){
 for(int i=25;i<30;++i){
   ll k=s-i;
 
    v=k/(n-1);
   
    if(k>n-1)j=k%(n-1);
   
   if(j>0){
     v++;
   }
  
   if(1<=v&&v<30){
     flag=true;
     break;
   }
 }
 }else{
   if(25<=s&&s<30){
     flag=true;
   }
 }
 
 if(n>=s&&25<=s){
    flag=true;
 }
 YesNo(flag);
} 

                                                                                                                           /*  
+++++        ++                                
++  +++                   +                                                                    /\          /\
++    +++    ++          ++                                                                   /  \        /  \
++      ++   ++     ++++++++++  +++        ++++      +++      +++++       +++++              /    \      /    \
++      ++   ++     ++      ++    +++     ++++++    +++     ++     ++   ++     ++          
++    +++    ++     ++      ++      +++  +++  +++  +++      ++++++++++  ++++++++++
++  +++      ++     ++++++++++       ++++++    ++++++       ++          ++ 
+++++        ++          ++           ++++      ++++         ++++++++    ++++++++               "Lets Enjoy!"   
                    ++++++++++     
                    ++      ++    
                    ++      ++
                    ++++++++++                                                                               
 
                                         Λ  Λ    / ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄
                                        ( ゚ー゚)< now rating【157】+55 
                                          ̄ ̄    \___________
    人     / ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄
 ( ゚ー゚)<  #灰coderですがなにか                                                                                                                                                
    ̄ ̄    \___________

                                                                                                                          */
0