Submission #167320

# Submission time Handle Problem Language Result Execution time Memory
167320 2019-12-07T11:07:54 Z AKaan37 Izlet (COI19_izlet) C++17
25 / 100
1091 ms 78368 KB
//Sani buyuk Osman Pasa Plevneden cikmam diyor.
//FatihSultanMehmedHan
//Abdulhamid Han
//Bismillahirrahmanirrahim
//█▀█─█──█──█▀█─█─█
//█▄█─█──█──█▄█─█▄█
//█─█─█▄─█▄─█─█─█─█

#pragma GCC optimize ("O3")
#pragma GCC target ("sse4")

#include <bits/stdc++.h>

using namespace std;

typedef long long lo;
typedef pair< lo,lo > PII;

#define fi first
#define se second
#define mp make_pair
#define pb push_back
#define fio() ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL)
#define FOR for(lo i=1;i<=n;i++)
#define mid ((start+end)/2)
#define ort ((bas+son)/2)

const lo MAX = -1000000000000000000;
const lo MIN = 1000000000000000000;
const lo inf = 1000000000;
const lo KOK = 100000;
const lo LOG = 30;
const lo li = 500005;
const lo mod = 1000000007;

lo n,m,b[li],a[3005][3005],k,flag,t,score,last[li];
lo cev;
string s;
vector<lo> v;

int main(void){
	scanf("%lld",&score);
	scanf("%lld",&n);
	FOR{
		for(lo j=1;j<=n;j++)scanf("%lld",&a[i][j]);
	}
	b[1]=1;
	lo yaz=1;
	for(lo i=2;i<=n;i++){
		flag=0;
		for(int j=i-1;j>=1;j--){
			if(a[i][j]==a[i-1][j]){flag=1;b[i]=b[j];break;}
		}
		if(!flag) b[i]=++yaz;
		//~ else if(b[i]==0) b[i]=b[i-1];
		for(int j=1;j<=i;j++){
			last[j]=a[i][j];
		}
	}
	FOR printf("%lld ",b[i]);
	printf("\n");
	for(lo i=1;i<n;i++){
		printf("%lld %lld\n",i,i+1);
	}
	return 0;
}

Compilation message

izlet.cpp: In function 'int main()':
izlet.cpp:42:7: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
  scanf("%lld",&score);
  ~~~~~^~~~~~~~~~~~~~~
izlet.cpp:43:7: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
  scanf("%lld",&n);
  ~~~~~^~~~~~~~~~~
izlet.cpp:45:28: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
   for(lo j=1;j<=n;j++)scanf("%lld",&a[i][j]);
                       ~~~~~^~~~~~~~~~~~~~~~~
# Verdict Execution time Memory Grader output
1 Incorrect 2 ms 504 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 827 ms 78368 KB Output is correct
2 Correct 830 ms 74440 KB Output is correct
3 Correct 993 ms 75000 KB Output is correct
4 Correct 1091 ms 74924 KB Output is correct
5 Correct 827 ms 74360 KB Output is correct
6 Correct 855 ms 76024 KB Output is correct
7 Correct 630 ms 63352 KB Output is correct
# Verdict Execution time Memory Grader output
1 Incorrect 2 ms 504 KB Output isn't correct
2 Halted 0 ms 0 KB -