topcoder插件安装

首先上http://www.topcoder.com/tc?module=Static&d1=applet&d2=plugins下载3个插件:TZTester,CodeProcessor,FileEdit。

然后登陆Arena,选择"option"->"editor",然后“Add”,Name随意写,比如MyProcessor,EntryPoint选择codeprocessor.EntryPoint,大小写敏感。然后在class path那里选择刚才下载的插件,连续选择3个,会自动有分号把他们隔开。然后点OK就好了。
之后,把添加的插件选上“default”,然后选中它,按config。Enter EntryPoint那里填fileedit.EntryPoint,processor class填tangentz.TZTester,然后按一下Verify,如果都found到,那就一切正常。然后按configure,勾上“Write the problem description using HTML”,把File Extension那里改成html,这样题目描述就会被生成一个html文件,方便看题。把Backup existing file when overwrite 的勾去掉吧,没什么用。再有就是按configure,配置插件了。在“Enter directory read/write problems to:”这里填上你放程序文件的绝对路径。在code template,把language改成你用的语言,然后编辑模板。

下面是我的模板。

#include <string>
#include <vector>
#include <algorithm>
#include <iostream>
#include <sstream>
#include <fstream>
#include <map>
#include <set>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <ctime>
#include<iomanip>
using namespace std;

#define SZ(x) (int(x.size()))
int toInt(string s){
	istringstream sin(s); 
	int t; 
	sin>>t; 
	return t;
}
template<class T> string toString(T x){
	ostringstream sout; 
	sout<<x; 
	return sout.str();
}

// BEGIN CUT HERE
typedef long long int64;
int64 toInt64(string s){
	istringstream sin(s); 
	int64 t; 
	sin>>t;
	return t;
}
template<class T> T gcd(T a, T b){ 
	if(a<0) 
		return gcd(-a, b);
	if(b<0) 
		return gcd(a, -b);
	return (b == 0)? a : gcd(b, a % b);
}
// END CUT HERE 

class $CLASSNAME${
	public:
   		$RC$ $METHODNAME$($METHODPARMS$){
			$RC$ ret;

			return ret;
		}
    	$TESTCODE$
};

// BEGIN CUT HERE
int main()
{
	$CLASSNAME$ ___test;
	___test.run_test(-1);
	return 0;
}
// END CUT HERE


 转载自:http://blog.youkuaiyun.com/mindmb/article/details/5961041

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值