[ create a new paste ] login | about

Link: http://codepad.org/iE39pjCO    [ raw code | output | fork ]

boleynsu - C++, pasted on May 29:
#include <cstdio>
#include <iostream>
using namespace std;

typedef double db;
#define rep(i,n) for (int i=0;i<(n);i++)

typedef long long int lli;

#include <cstdio>
#include <iostream>
#include<cstdlib>
#include<cstring>
#include<algorithm>
using namespace std;

int main()
{
	int n,ans,x,i;
	while(scanf("%d",&n)!=EOF)
	{
		ans=0;
		for(i=1;i<=n+1;i++)
		{
			scanf("%d",&x);
			ans=ans^i;
			ans=ans^x;
		}
		ans=ans^(n+1);
		printf("%d\n",ans);
	}
}


Output:
1
2
Line 8: error: ISO C++ does not support 'long long'
compilation terminated due to -Wfatal-errors.


Create a new paste based on this one


Comments: