제출 #471212

#제출 시각아이디문제언어결과실행 시간메모리
471212KarabasanKošnja (COCI17_kosnja)C++17
50 / 50
20 ms624 KiB
#include <bits/stdc++.h>
#define forcin for(int i=0;i<n;i++) scanf("%d",&dizi[i]);
#define forcout for(int i=0;i<n;i++) printf("%d ",dizi[i]);
#define ll long long
#define fast ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL);
using namespace std;


int n,t;
int dizi[100005];
int cevap;
int main()
{
    scanf("%d",&n);
    int xxd=0;
    for(int i=0;i<n;i++)
    {
        int oyyy=31;
        int a,b;
        scanf("%d%d",&a,&b);
        cevap=(min(a,b))*2-2;
        for(long long j=0;j<LONG_MAX;j++)
        {
            oyyy+=2;
        }
        xxd=oyyy*2-389;
        printf("%d\n",cevap);
    }

    return 0;
}

컴파일 시 표준 에러 (stderr) 메시지

kosnja.cpp: In function 'int main()':
kosnja.cpp:15:9: warning: variable 'xxd' set but not used [-Wunused-but-set-variable]
   15 |     int xxd=0;
      |         ^~~
kosnja.cpp:14:10: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
   14 |     scanf("%d",&n);
      |     ~~~~~^~~~~~~~~
kosnja.cpp:20:14: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
   20 |         scanf("%d%d",&a,&b);
      |         ~~~~~^~~~~~~~~~~~~~
kosnja.cpp:24:17: warning: iteration 1073741808 invokes undefined behavior [-Waggressive-loop-optimizations]
   24 |             oyyy+=2;
      |             ~~~~^~~
kosnja.cpp:22:28: note: within this loop
   22 |         for(long long j=0;j<LONG_MAX;j++)
      |                            ^
#Verdict Execution timeMemoryGrader output
Fetching results...