답안 #470161

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
470161 2021-09-03T07:09:16 Z Karabasan Cezar (COCI17_cezar) C++17
50 / 50
1 ms 332 KB
#include <bits/stdc++.h>
#define fast ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL);
#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

using namespace std;
int n,t;
int dizi[100005];
int toplam;
int kartlar[52];
int main()
{
    fast;
    scanf("%d",&n);
    forcin;
    for(int i=0;i<n;i++)
        toplam+=dizi[i];
    int x=21-toplam;
    int k=2;
    for(int i=0;i<52;i++)
    {
        if(i%4==0&&i!=0)
            k++;
        kartlar[i]=k;
    }
    int cnt=0;
    for(int i=0;i<52;i++)
    {
        if(kartlar[i]>x)
            cnt++;
    }
    if(cnt>=26)
        printf("DOSTA");
    else printf("VUCI");
    return 0;
}

Compilation message

cezar.cpp: In function 'int main()':
cezar.cpp:15:10: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
   15 |     scanf("%d",&n);
      |     ~~~~~^~~~~~~~~
cezar.cpp:3:42: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
    3 | #define forcin for(int i=0;i<n;i++) scanf("%d",&dizi[i]);
      |                                     ~~~~~^~~~~~~~~~~~~~~
cezar.cpp:16:5: note: in expansion of macro 'forcin'
   16 |     forcin;
      |     ^~~~~~
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 204 KB Output is correct
2 Correct 1 ms 204 KB Output is correct
3 Correct 0 ms 204 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 204 KB Output is correct
2 Correct 0 ms 204 KB Output is correct
3 Correct 1 ms 204 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 204 KB Output is correct
2 Correct 0 ms 204 KB Output is correct
3 Correct 0 ms 204 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 204 KB Output is correct
2 Correct 1 ms 204 KB Output is correct
3 Correct 1 ms 204 KB Output is correct
# 결과 실행 시간 메모리 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
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 204 KB Output is correct
2 Correct 0 ms 204 KB Output is correct
3 Correct 0 ms 204 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 204 KB Output is correct
2 Correct 0 ms 204 KB Output is correct
3 Correct 1 ms 204 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 204 KB Output is correct
2 Correct 1 ms 204 KB Output is correct
3 Correct 0 ms 204 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 204 KB Output is correct
2 Correct 0 ms 204 KB Output is correct
3 Correct 0 ms 332 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 204 KB Output is correct
2 Correct 1 ms 204 KB Output is correct
3 Correct 0 ms 204 KB Output is correct