New post

Show post

Search forum

Read post
为什么我的代码Restricted Function??? [ Topic ] 2012-01-23 01:14:04 iphxer
using namespace std;

struct point{
    int a,b;
bool operator<(const point &p1,const point& p2)
    if(p1.a<p2.a)return 1;
    else if(p1.a==p2.a)return p1.b<p2.b;
    return 0;
int dir[5][2]={0,0,0,1,0,-1,1,0,-1,0};
int main()
    int a,b,n;
    int t=0;
        map<point,int> m;
        for(int i=0;i<n;i++)scanf("%d%d",&tab[i].a,&tab[i].b);
        for(int i=0;i<n;i++){
            for(int j=0;j<5;j++){
        int c=0;
        for(int i=0;i<n;i++)if(m[tab[i]]<3)c++;
        printf("Case %d: %d\n",++t,c);
University of Science and Technology of China
Online Judge for ACM/ICPC
Processed in 2.1ms with 2 query(s).