Submission #168326

# Submission time Handle Problem Language Result Execution time Memory
168326 2019-12-12T12:14:43 Z ArKCa Karte (COCI18_karte) C++17
0 / 120
144 ms 4880 KB
#include <bits/stdc++.h>
#define  ll  long long 
#define  mod 1000000007
#define  pb  push_back
#define  pob pop_back
#define  f1  first
#define  s2  second
#define  N   500005
#define  ekle 200
using namespace std;

int n,cnt,a,k;
vector<int>doru;
int dizi[N];
int main(){
	// freopen("a.gir","r",stdin);		
    // freopen("a.cik","w",stdout);

    scanf("%d %d",&n,&k);
    for(int i=0;i<n;i++){
    	scanf("%d",&dizi[i]);
    }
    sort(dizi,dizi+n);
    reverse(dizi+(n-k),dizi+n);
    reverse(dizi,dizi+n);
    for(int i=0;i<n;i++){
    	printf("%d ",dizi[i] );
    }

}

Compilation message

karte.cpp: In function 'int main()':
karte.cpp:19:10: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
     scanf("%d %d",&n,&k);
     ~~~~~^~~~~~~~~~~~~~~
karte.cpp:21:11: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
      scanf("%d",&dizi[i]);
      ~~~~~^~~~~~~~~~~~~~~
# Verdict Execution time Memory Grader output
1 Correct 2 ms 376 KB Output is correct
2 Incorrect 2 ms 376 KB Output isn't correct
# Verdict Execution time Memory Grader output
1 Incorrect 2 ms 380 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 2 ms 376 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 2 ms 376 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 2 ms 256 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 3 ms 376 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 2 ms 376 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 31 ms 1264 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 60 ms 2168 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 144 ms 4880 KB Output isn't correct
2 Halted 0 ms 0 KB -