Submission #167301

# Submission time Handle Problem Language Result Execution time Memory
167301 2019-12-07T08:54:13 Z AKaan37 Izlet (COI19_izlet) C++17
0 / 100
861 ms 77588 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]==last[j]){flag=1;b[i]=b[j];break;}
		}
		if(!flag) b[i]=++yaz;
		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 1 ms 504 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 861 ms 77588 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 504 KB Output isn't correct
2 Halted 0 ms 0 KB -