TopCoder SRM 插件配置,图文版

 网上看了不少tc插件配置的文章,有的有些小错误,有的把几篇合在一起,不方便看。

这里写下一篇自己配置的过程。

1.下载插件

下载地址:

http://www.topcoder.com/tc?module=Static&d1=applet&d2=plugins

使用了网上推荐的经典的3个插件

CodeProcessor v2.0:可以在预处理,后处理等流程调用其他插件,相当于批处理

FileEdit:读取题目描述,自动生成类代码到一个源文件,方便用其他IDE调用

TZTester:自动生成题目给的sample的测试代码,很方便

 

2.配置插件

进入TC竞技场

选择Options->Editors

 

 

 

点击Add按钮,增加一个Editor

名字随便起

EntryPoint表示入口类,这里填入 codeprocessor.EntryPoint  大小写敏感

ClassPath表示需要用到的类的jar包地址,使用Browse按钮3次,加入3个插件的jar包,会自动加分号

OK之后把新增的这行Default这列给勾上,作为默认的Editor

点击新增的行,再点Configure按钮,配置插件

Enter EntryPoint那里填fileedit.EntryPoint,processor class填tangentz.TZTester

点中fileedit.EntryPoint,点右侧的Configure

几个选项根据自己需要勾选,Code Temple里,选C++,填入模板

$BEGINCUT$ /* $PROBLEMDESC$ */ $ENDCUT$ #line $NEXTLINENUMBER$ "$FILENAME$" #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; #define PB push_back #define MP make_pair #define REP(i,n) for(i=0;i<(n);++i) #define FOR(i,l,h) for(i=(l);i<=(h);++i) #define FORD(i,h,l) for(i=(h);i>=(l);--i) typedef vector VI; typedef vector VS; typedef vector VD; typedef long long LL; typedef pair PII; class $CLASSNAME$ { public: $RC$ $METHODNAME$($METHODPARMS$) { $CARETPOSITION$ } $TESTCODE$ }; // BEGIN CUT HERE int main() { $CLASSNAME$ ___test; ___test.run_test(-1); return 0; } // END CUT HERE

按几次Save回到竞技场,配置完成。

3.使用

打开题目后,在fileedit里设定的路径中自动创建了源文件,使用喜欢的IDE打开,在$CARETPOSITION$的地方写入你的代码。

写完后回到竞技场,点击compile编译,按submit提交,都是自动找之前建立的源文件,非常方便。

你可能感兴趣的:(TopCoder SRM 插件配置,图文版)