topcoder配置

一般来说,我们安装这三个插件就够了:“FileEdit,CodeProcessor ,TZTester”,把他们下载了之后,放在一个文件夹里面,并且要保证以后不要移动这个文件夹的位置(该文件夹尽量处在桌面路径附近)!

 

一:
登陆arena之后,选择:Options → Editors,调出了新的窗口,按Add

在name栏填FileEdit,EntryPoint栏填fileedit.EntryPoint,路径的话,直接浏览FileEdit.jar所在的位置即可,按OK

(*)选定FileEdit(高亮显示),按configure,根据自己的要求配置一下。

注意每一步之后都不要忘了“save”和“close”

 

二:

继续options → Editors,调出了新的窗口,按Add(ps:这次要添加以上全部三个文件包括“FileEdit.jar")

这一次name栏填CodeProcessor",EntryPoint栏填codeprocessor.EntryPoint,路径栏直接浏览三个文件就可以(当初我看他们的文章,他们说三个路径之间要加分号,实际上只要依次浏览了三个文件,该栏上显示的三个路径,自然以分号相隔),按ok

选定CodeProcessor(高亮显示),按Configure

在Editor EntryPoint栏,键入fileedit.EntryPoint(如果你再按后面的Configure的话,就会发现和前面加*的那一步,调出来的菜单一样,就是配置编辑器选项而已)

在Processor Class栏,键入tangentz.TZTester,按Verify,弹出窗口OK,按OK键

别忘了保存,save

选择CodeProcessor做你的Default Editor, 按 Save键

 

三:

完成咯!注意:在上面的“二”之前一定要有上面的“—”;对于codeprocessor.EntryPoint和fileedit.EntryPoint,照填就可以,没有“(case sentive)”,这个括号只是告诉我们名字是大小写敏感的而已;Options → Editors,调出的窗口上面的common path空着就可以(反正下面浏览文件时,自动填入的是绝对路径)

首先我们上http://www.topcoder.com/tc?module=Static&d1=applet&d2=plugins这 里下载几个插件,主要是这三个:1.Plugin Name: TZTester   2.Plugin Name: CodeProcessor 3.Plugin Name: FileEdit,下载后如果他们的后缀名变成了*.zip,记得把他们改回.jar的。
然后登陆Arena,选择"option"->"editor",然后“Add”,Name那里可以自己起一个,例如“MyEditor”, EntryPoint选择codeprocessor.EntryPoint,记得是大小写敏感的。然后在class path那里填入你插件的绝对路径,然后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 的勾去掉吧,没什么用。
在“Enter directory read/write problems to:”这里填上你放程序文件的绝对路径
然后按一下code template,把language改成c++,把一下模版贴上去:


$BEGINCUT$
$PROBLEMDESC$
$ENDCUT$
#line $NEXTLINENUMBER$ "$FILENAME$"

 

#include <vector>

#include <list>

#include <map>

#include <set>

#include <deque>

#include <queue>

#include <stack>

#include <bitset>

#include <algorithm>

#include <functional>

#include <numeric>

#include <utility>

#include <sstream>

#include <iostream>

#include <iomanip>

#include <cstdio>

#include <cmath>

#include <cstdlib>

#include <cctype>

#include <string>

#include <cstring>

#include <cstdio>

#include <cmath>

#include <cstdlib>

#include <ctime>

using namespace std;

 

// BEGIN CUT HERE

//Begin Sosi TopCoder 

//const double EPS=1e-11;

//const double PI=acos(-1.0);

//const short INF=32767,NF= -32768;

//const int INF=2147483647,NF= -2147483648;

//const long long INF=9223372036854775807,NF=-9223372036854775808;

//const long double INF=99999999.99999999;

 

//Numberic Functions

//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);}

//template <class T> T lcm(T a,T b){ return a*(b/gcd(a,b));}

//template<class T> inline vector<pair<T,int> > factorize(T n)

//   {vector<pair<T,int> > R;for (T i=2;n>1;){if (n%i==0){int C=0;for (;n%i==0;C++,n/=i);R.push_back(make_pair(i,C));}

//   i++;if (i>n/i) i=n;}if (n>1) R.push_back(make_pair(n,1));return R;}

//template<class T> inline bool isPrimeNumber(T n)

//   {if(n<=1)return false;for (T i=2;i*i<=n;i++) if (n%i==0) return false;return true;}

//template<class T> inline T eularFunction(T n)

//   {vector<pair<T,int> > R=factorize(n);T r=n;for (int i=0;i<R.size();i++)r=r/R[i].first*(R[i].first-1);return r;}

 

//Translator

//template<class T> string toString(T n){ostringstream ost;ost<<n;ost.flush();return ost.str();}

//int toInt(string s){int r=0;istringstream sin(s);sin>>r;return r;}//NOTES:toInt(

//long long toInt64(string s){long long r=0;istringstream sin(s);sin>>r;return r;}

//double toDouble(string s){double r=0;istringstream sin(s);sin>>r;return r;}//NOTES:toDouble(

//template<class T> void stoa(string s,int &n,T A[]){n=0;istringstream sin(s);for(T v;sin>>v;A[n++]=v);}

//template<class T> void atos(int n,T A[],string &s){ostringstream sout;for(int i=0;i<n;i++){if(i>0)sout<<' ';sout<<A[i];}s=sout.str();}

//template<class T> void atov(int n,T A[],vector<T> &vi){vi.clear();for (int i=0;i<n;i++) vi.push_back(A[i]);}

//template<class T> void vtoa(vector<T> vi,int &n,T A[]){n=vi.size();for (int i=0;i<n;i++)A[i]=vi[i];}

//template<class T> void stov(string s,vector<T> &vi){vi.clear();istringstream sin(s);for(T v;sin>>v;vi.push_bakc(v));}

//template<class T> void vtos(vector<T> vi,string &s){ostringstream sout;for (int i=0;i<vi.size();i++){if(i>0)sout<<' ';sout<<vi[i];}s=sout.str();}

 

//Fraction

//template<class T> struct Fraction{T a,b;Fraction(T a=0,T b=1);string toString();};

//template<class T> Fraction<T>::Fraction(T a,T b){T d=gcd(a,b);a/=d;b/=d;if (b<0) a=-a,b=-b;this->a=a;this->b=b;}

//template<class T> string Fraction<T>::toString(){ostringstream sout;sout<<a<<"/"<<b;return sout.str();}

//template<class T> Fraction<T> operator+(Fraction<T> p,Fraction<T> q){return Fraction<T>(p.a*q.b+q.a*p.b,p.b*q.b);}

//template<class T> Fraction<T> operator-(Fraction<T> p,Fraction<T> q){return Fraction<T>(p.a*q.b-q.a*p.b,p.b*q.b);}

//template<class T> Fraction<T> operator*(Fraction<T> p,Fraction<T> q){return Fraction<T>(p.a*q.a,p.b*q.b);}

//template<class T> Fraction<T> operator/(Fraction<T> p,Fraction<T> q){return Fraction<T>(p.a*q.b,p.b*q.a);}

 

//STL

//bool comp(T A,T B){return A<B?1:0; }

//do{ } while(next_permutation(T.begin(), T.end()));

//int dirx[]={1,0,-1,0};

//int diry[]={0,-1,0,1}; //clockwise

//int dirx[]={1, 1, 0,-1,-1,-1,0,1};

//int diry[]={0,-1,-1,-1, 0, 1,1,1}; //clockwise

//End Sosi TopCoder

// END CUT HERE

 

class $CLASSNAME$
{
        public:
        $RC$ $METHODNAME$($METHODPARMS$)
        {
                $CARETPOSITION$
        }
        $TESTCODE$
};

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

然后一起保存,就OK了。关闭Arena,再打开,现在打开一道题目看看,是不是很方便^_^

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值