Submission #300301

# Submission time Handle Problem Language Result Execution time Memory
300301 2020-09-17T04:49:22 Z nadidadit Connecting Supertrees (IOI20_supertrees) C++14
Compilation error
0 ms 0 KB
#include<bits/stdc++.h>
using namespace std;
int main()
{
	int n;
	cin>>n;
	int arra[n][n],adit[n][n];
	for(int i=0;i<n;i++)
	{
		for(int j=0;j<n;j++)
		{
			adit[i][j]=0;
		}
	}
	for(int i=0;i<n;i++)
	{
		for(int j=0;j<n;j++)
		{
			cin>>arra[i][j];
		}
	}
	for(int i=0;i<n;i++)
    {
    	for(int j=0;j<n;j++)
    	{
    		if(i-j==1 || j-i==1 || i==j)
    		{
    			adit[i][j]=1;
			}
		}
	}
	for(int i=0;i<n;i++)
	{
		for(int j=0;j<n;j++)
		{
			if(j<n-1)
			{
			cout<<adit[i][j]<<" ";
		    }
		}
		cout<<endl;
	}
	
}

Compilation message

/tmp/ccjwxtHT.o: In function `main':
grader.cpp:(.text.startup+0x0): multiple definition of `main'
/tmp/ccpBuORZ.o:supertrees.cpp:(.text.startup+0x0): first defined here
/tmp/ccjwxtHT.o: In function `main':
grader.cpp:(.text.startup+0x3a2): undefined reference to `construct(std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int, std::allocator<int> > > >)'
collect2: error: ld returned 1 exit status