Submission #471205

# Submission time Handle Problem Language Result Execution time Memory
471205 2021-09-07T16:31:26 Z Karabasan Košnja (COCI17_kosnja) C++17
50 / 50
17 ms 588 KB
#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;
#pragma GCC optimize("Ofast")
#pragma GCC target("fma,sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,avx2,tune=native")
#pragma GCC optimize("unroll-loops")

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

Compilation message

kosnja.cpp: In function 'int main()':
kosnja.cpp:27:13: warning: variable 'xxd' set but not used [-Wunused-but-set-variable]
   27 |         int xxd=0;
      |             ^~~
kosnja.cpp:16:10: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
   16 |     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);
      |         ~~~~~^~~~~~~~~~~~~~
# Verdict Execution time Memory Grader output
1 Correct 1 ms 204 KB Output is correct
2 Correct 0 ms 204 KB Output is correct
3 Correct 0 ms 204 KB Output is correct
4 Correct 0 ms 204 KB Output is correct
5 Correct 0 ms 204 KB Output is correct
6 Correct 11 ms 452 KB Output is correct
7 Correct 16 ms 588 KB Output is correct
8 Correct 16 ms 416 KB Output is correct
9 Correct 17 ms 588 KB Output is correct
10 Correct 12 ms 460 KB Output is correct