Google Code Jam – Template Objective-C by vudduu

vudduu: …

#import <Foundation/Foundation.h>
#include <math.h>
#include <string.h>
#include <stdio.h>
#include <string.h>

#define FOR(i,a,b)  for(int i=(a),_##i=(b);i<_##i;++i)
#define F(i,a)      FOR(i,0,a)
#define ALL(x)      x.begin(),x.end()
#define PB          push_back
#define MP          make_pair
typedef long long   LL;

char mapa[300];

@interface ClassSolve:NSObject{

}
- (void) solve;
@end

@implementation ClassSolve
	-(id) init {
		self = [super init];

		return self;
	}
	- (void) solve {
		int res;

		printf("%dn", res);
	}
@end

int main(int argc, const char * argv[]) {
	@autoreleasepool {
		freopen("/Users/edwinguzman/Downloads/a.in", "r", stdin);
		//freopen("/Users/edwinguzman/Downloads/A-small-attempt0.in.txt", "r", stdin);
		freopen("/Users/edwinguzman/Downloads/a.out", "w", stdout);
		int T;
		scanf("%d", &T);
		gets(A);
		F(cas, T){
			ClassSolve *class = [[ClassSolve alloc] init];
			printf("Case #%d: ", cas+1);
			[class solve];
		}
	}
	return 0;
}

 

Anuncios