a-young-man-jrs

C++博客 联系 聚合 管理
  5 Posts :: 2 Stories :: 1 Comments :: 0 Trackbacks

一般来说,我们安装这三个插件就够了:“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 <cstdlib>
#include <cctype>
#include <cstring>
#include <cstdio>
#include <cmath>
#include <algorithm>
#include <vector>
#include <string>
#include <iostream>
#include <sstream>
#include <map>
#include <set>
#include <queue>
#include <stack>
#include <fstream>
#include <numeric>
#include <iomanip>
#include <bitset>
#include <list>
#include <stdexcept>
#include <functional>
#include <utility>
#include <ctime>
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<int> VI;
typedef vector<string> VS;
typedef vector<double> VD;
typedef long long LL;
typedef pair<int,int> 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

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


posted on 2009-05-22 09:35 神剑戎 阅读(3482) 评论(1)  编辑 收藏 引用

Feedback

# re: topcoder 插件 2010-05-18 20:05 GreenHand
刚才忘了怎么加测试代码了,谢博主^_^  回复  更多评论
  


只有注册用户登录后才能发表评论。
网站导航: 博客园   IT新闻   BlogJava   知识库   博问   管理