跳到正文

sXins

107108

在洛谷打开
资料、奖项与版本

资料

编号
107108
抓取

娱乐\boxed{\text{娱乐}}

神贴\boxed{\text{神贴}}

存档\boxed{\text{存档}}

公司\boxed{\text{公司}}

狼人杀\boxed{\text{狼人杀}}

帖子保存器\boxed{\text{帖子保存器}}

神奇测试小网站\boxed{\text{神奇测试小网站}}

练习题目颜色显示\boxed{\text{练习题目颜色显示}}

∽∽∽工具网站分区∽∽∽\text{∽∽∽工具网站分区∽∽∽}

OI画图工具 ∽ Graph Editor1\boxed{\text{OI画图工具 ∽ Graph Editor1}}

几何画板 ∽ Graph Editor2\boxed{\text{几何画板 ∽ Graph Editor2}}

数据检索网站 ∽ OEIS\boxed{\text{数据检索网站 ∽ OEIS}}

图形计算器 ∽ Geo Gebra\boxed{\text{图形计算器 ∽ Geo Gebra}}

图形计算器(经典) ∽ Geo Gebra(Classical)\boxed{\text{图形计算器(经典) ∽ Geo Gebra(Classical)}}

写字板 ∽ Myscript\boxed{\text{写字板 ∽ Myscript}}

函数图像生成器 ∽ Desmos\boxed{\text{函数图像生成器 ∽ Desmos}}

∽∽∽OJ网站分区∽∽∽\text{∽∽∽OJ网站分区∽∽∽}

V站 ∽ Virtual Judge\boxed{\text{V站 ∽ Virtual Judge}}

牛牛 ∽ 牛客竞赛\boxed{\text{牛牛 ∽ 牛客竞赛}}

CF ∽ Codeforces\boxed{\text{CF ∽ Codeforces}}

LOJ ∽ LibreOJ\boxed{\text{LOJ ∽ LibreOJ}}

POJ ∽ PKU JudgeOnline\boxed{\text{POJ ∽ PKU JudgeOnline}}

HDU ∽ HDU Online Judge\boxed{\text{HDU ∽ HDU Online Judge}}

Brainfxxk编译器\text{Brainfxxk编译器}

从srs.txt中读入源代码,in.txt中读入输入文件,将结果输出至out.txt。\text{从\colorbox{f0f0f0}{srs.txt}中读入源代码,\colorbox{f0f0f0}{in.txt}中读入输入文件,将结果输出至\colorbox{f0f0f0}{out.txt}。}

C++
#include<bits/stdc++.h>
using namespace std;
const int SIZ =1e6+3;
int L[SIZ],R[SIZ],T[SIZ],tot; char P[SIZ];
bool cp(char *s){
    stack <int> st; for(int i=0;s[i]!='\0';++i){
        if(s[i]=='[') st.push(i); else if(s[i]==']')
        if(st.empty()) return false; else T[i]=st.top(),st.pop(); 
    }
    return true;
}
char sr[SIZ],rs[SIZ]; int len;
#define writechr(c){rs[len++]=c;}
bool rn(char *s){
    int tim=0,p=0;
    for(int i=0;s[i]!='\0';++i,++tim){
        if(tot>=SIZ-1) {puts("MLE."); return false;}
        if(tim>=1e9)   {puts("TLE."); return false;}
        if(len>=SIZ-1) {puts("OLE."); return false;}
        switch(s[i]){
        case '<': if(!L[p]) L[p]=++tot; p=L[p]; break;
        case '>': if(!R[p]) R[p]=++tot; p=R[p]; break;
        case ']': if(P[p]!=0) i=T[i]; break;
        case ',': P[p]=getchar(); break;
        case '.': writechr(P[p]); break;
        case '-': --P[p]; break; case '+': ++P[p];
        }
    }
    return true;
}
char fl[256]="srs.txt";
char in[256]="in.txt";
char ot[256]="out.txt";
int main(){
    if(fl[0]=='\0') freopen("CON","r",stdin),puts("Source File:"),scanf("%s",fl);
    freopen(fl,"r",stdin),scanf("%s",sr); if(!cp(sr)) puts("Complite Failed!"),exit(0);
    if(in[0]=='\0') freopen("CON","r",stdin),puts("Input  File:"),scanf("%s",in);
    freopen(in,"r",stdin); if(rn(sr)) puts("Run succeed."); else exit(0);
    if(in[0]=='\0') freopen("CON","r",stdin),puts("Output File:"),scanf("%s",ot);
    freopen(ot,"w",stdout); fwrite(rs,1,len,stdout);
    return 0;
}

洛谷相关颜色参考表\text{洛谷相关颜色参考表}

颜色十六进制RGB值颜色十六进制RGB值AC绿52C41A(82,196,26)入门红FE4C61(254,76,97)WA红E74C3C(231,76,60)普及-橙F39C11(243,156,17)RE紫9D3DCF(157,61,207)普及黄FFC116(255,193,22)CE黄FADB14(250,219,20)普及+提高 绿52C41A(82,196,26)TLE黑052242(5,34,66)提高+省选-蓝3498DB(52,152,219)MLE黑052242(5,34,66)省选紫9D3DCF(157,61,207)OLE黑052242(5,34,66)NOI黑0E1D69(14,39,105)UKE蓝0E1D69(14,29,105)未评定灰BFBFBF(191,191,191)紫名8E44AD(142,68,173)排行绿52C41A(82,196,26)红名E74C3C(231,76,60)排行橙F39C11(243,156,17)橙名E67E22(230,126,34)排行黄FADB14(250,219,20)绿名5EB95E(94,185,94)排行红E74C3C(231,76,60)蓝名0E90D2(14,144,210)通过钩绿52C41A(82,196,26)灰名BFBFBF(191,191,191)不通过叉红E74C3C(231,76,60)吉利红E74C3C(231,76,60)官方比赛红E74C3C(231,76,60)中平绿5EB95E(94,185,94)团队比赛绿054310(5,67,16)凶兆黑000000(0,0,0)个人比赛蓝3498DB(52,152,219)ACM制紫8E44AD(142,68,173)Rated绿5EB95E(94,185,94)IOI制黄F1C40F(241,196,15)未开始绿5EB95E(94,185,94)乐多制黄F1C40F(241,196,15)已结束红E74C3C(231,76,60)OI制橙F39C11(243,156,17)进行中*暂时无暂时无背景灰EFEFEF(239, 239, 239)小字灰7F7F7F(127,127,127)按钮蓝0E90D2(14,144,210)链接蓝3498DB(52,152,219)按钮红DD514C(221,81,76)通过率蓝3498DB(52,152,219)金钩黄FFE169(255,225,105)背景粉F5CECD(245,206,205)绿钩绿5EB95E(94,185,94)背景绿C9E7C9(201,231,201)蓝钩蓝3498DB(52,152,219)背景蓝CAEBFB(202,235,251)题目来源蓝3498DB(52,152,219)灰色7F7F7F(127,127,127)题目算法红E74C3C(231,76,60)白色FFFFFF(255,255,255)题目地点绿52C41A(82,196,26)黑色000000(0,0,0)\def\arraystretch{1.2} \begin{array}{|c|l|l||c|l|l|} \hline 颜色 & 十六进制 & RGB值 & 颜色 & 十六进制 & RGB值 \\ \hline \color{#52C41A}\text{AC绿} & \text{52C41A} & \text{(82,196,26)} & \color{#FE4C61}\text{入门红} & \text{FE4C61} & \text{(254,76,97)} \\ \hline \color{#E74C3C}\text{WA红} & \text{E74C3C} & \text{(231,76,60)} & \color{#F39C11}\text{普及-橙} & \text{F39C11} & \text{(243,156,17)} \\ \hline \color{#9D3DCF}\text{RE紫} & \text{9D3DCF} & \text{(157,61,207)} & \color{#FFC116}\text{普及黄} & \text{FFC116} & \text{(255,193,22)}\\ \hline \color{#FADB14}\text{CE黄} & \text{FADB14} & \text{(250,219,20)} & \color{#52C41A}\text{普及+提高 绿} & \text{52C41A} & \text{(82,196,26)} \\ \hline \color{#052242}\text{TLE黑} & \text{052242} & \text{(5,34,66)} & \color{#3498DB}\text{提高+省选-蓝} & \text{3498DB} & \text{(52,152,219)} \\ \hline \color{#052242}\text{MLE黑} & \text{052242} & \text{(5,34,66)} & \color{#9D3DCF}\text{省选紫} & \text{9D3DCF} & \text{(157,61,207)} \\ \hline \color{#052242}\text{OLE黑} & \text{052242} & \text{(5,34,66)} & \color{#0E1D69}\text{NOI黑} & \text{0E1D69} & \text{(14,39,105)} \\ \hline \color{#0E1D69}\text{UKE蓝} & \text{0E1D69} & \text{(14,29,105)} & \color{#BFBFBF}\text{未评定灰} & \text{BFBFBF} & \text{(191,191,191)} \\ \hline \hline \color{#8E44AD}\text{紫名} & \text{8E44AD} & \text{(142,68,173)} & \color{#52C41A}\text{排行绿} & \text{52C41A} & \text{(82,196,26)} \\ \hline \color{#E74C3C}\text{红名} & \text{E74C3C} & \text{(231,76,60)} & \color{#F39C11}\text{排行橙} & \text{F39C11} & \text{(243,156,17)} \\ \hline \color{#E67E22}\text{橙名} & \text{E67E22} & \text{(230,126,34)} & \color{#FADB14}\text{排行黄} & \text{FADB14} & \text{(250,219,20)} \\ \hline \color{#5EB95E}\text{绿名} & \text{5EB95E} & \text{(94,185,94)} & \color{#E74C3C}\text{排行红} & \text{E74C3C} & \text{(231,76,60)}\\ \hline \color{#0E90D2}\text{蓝名} & \text{0E90D2} & \text{(14,144,210)} & \color{#52C41A}\text{通过钩绿} & \text{52C41A} & \text{(82,196,26)} \\ \hline \color{#BFBFBF}\text{灰名} & \text{BFBFBF} & \text{(191,191,191)} & \color{#E74C3C}\text{不通过叉红} & \text{E74C3C} & \text{(231,76,60)} \\ \hline \hline \color{#E74C3C}\text{吉利红} & \text{E74C3C} & \text{(231,76,60)} & \color{#E74C3C}\text{官方比赛红} & \text{E74C3C} & \text{(231,76,60)} \\ \hline \color{#5EB95E}\text{中平绿} & \text{5EB95E} & \text{(94,185,94)} & \color{#054310}\text{团队比赛绿} & \text{054310} & \text{(5,67,16)} \\ \hline \color{#000000}\text{凶兆黑} & \text{000000} & \text{(0,0,0)} & \color{#3498DB}\text{个人比赛蓝} & \text{3498DB} & \text{(52,152,219)} \\ \hline \hline \color{#8E44AD}\text{ACM制紫} & \text{8E44AD} & \text{(142,68,173)} & \color{#5EB95E}\text{Rated绿} & \text{5EB95E} & \text{(94,185,94)} \\ \hline \color{#F1C40F}\text{IOI制黄} & \text{F1C40F} & \text{(241,196,15)} & \color{#5EB95E}\text{未开始绿} & \text{5EB95E} & \text{(94,185,94)} \\ \hline \color{#F1C40F}\text{乐多制黄} & \text{F1C40F} & \text{(241,196,15)} & \color{#E74C3C}\text{已结束红} & \text{E74C3C} & \text{(231,76,60)} \\ \hline \color{#F39C11}\text{OI制橙} & \text{F39C11} & \text{(243,156,17)} & \color{#52C410}\text{进行中*} & \text{暂时无} & \text{暂时无} \\ \hline \hline \color{#EFEFEF}\text{背景灰} & \text{EFEFEF} & \text{(239, 239, 239)} & \color{#7F7F7F}\text{小字灰} & \text{7F7F7F} & \text{(127,127,127)} \\ \hline \hline \color{#0E90D2}\text{按钮蓝} & \text{0E90D2} & \text{(14,144,210)} & \color{#3498DB}\text{链接蓝} & \text{3498DB} & \text{(52,152,219)} \\ \hline \color{#DD514C}\text{按钮红} & \text{DD514C} & \text{(221,81,76)} & \color{#3498DB}\text{通过率蓝} & \text{3498DB} & \text{(52,152,219)} \\ \hline \hline \color{#FFE169}\text{金钩黄} & \text{FFE169} & \text{(255,225,105)} & \color{#F5CECD}\text{背景粉} & \text{F5CECD} & \text{(245,206,205)} \\ \hline \color{#5EB95E}\text{绿钩绿} & \text{5EB95E} & \text{(94,185,94)} & \color{#C9E7C9}\text{背景绿} & \text{C9E7C9} & \text{(201,231,201)} \\ \hline \color{#3498DB}\text{蓝钩蓝} & \text{3498DB} & \text{(52,152,219)} & \color{#CAEBFB}\text{背景蓝} & \text{CAEBFB} & \text{(202,235,251)} \\ \hline \hline \color{#3498DB}\text{题目来源蓝} & \text{3498DB} & \text{(52,152,219)} &\color{#7F7F7F}\text{灰色} & \text{7F7F7F} & \text{(127,127,127)} \\ \hline \color{#E74C3C}\text{题目算法红} & \text{E74C3C} & \text{(231,76,60)}& \color{#FFFFFF}\text{白色} & \text{FFFFFF} & \text{(255,255,255)} \\ \hline \color{#52C41A}\text{题目地点绿} & \text{52C41A} & \text{(82,196,26)}& \color{#000000}\text{黑色} & \text{000000} & \text{(0,0,0)} \\ \hline \end{array}

还没有收录这位用户的文章。