91av视频/亚洲h视频/操亚洲美女/外国一级黄色毛片 - 国产三级三级三级三级

  • 大小: 142KB
    文件類型: .zip
    金幣: 2
    下載: 0 次
    發(fā)布日期: 2021-06-13
  • 語言: 其他
  • 標(biāo)簽: ACM??ICPC??Latex??模版??

資源簡(jiǎn)介

玩ACM-ICPC的學(xué)生,還在為生成、打印自己的模版代碼庫而煩惱?這個(gè)工具能夠幫你!如果你有自己的模版代碼,它就能把你的模版生成到一個(gè)tex文件里面,進(jìn)而生成一份漂亮的Latex風(fēng)格的pdf文件,進(jìn)而用于打印。

資源截圖

代碼片段和文件信息

#include?
#include?
const?int?MAXL?=?100;
const?char*?cf?=?“/config“;
const?char*?tf?=?“template.tex“;
const?char*?head?=?“head“;
const?char*?tail?=?“tail“;
int?secn;
char?sec[20][MAXL];
FILE*?tex?=?NULL;
char?temp[MAXL];
struct?LineBreaker?{
??char?name[MAXL]?file[MAXL];
??int?nl?fl;
??void?solve(const?char?s[])?{
????nl?=?fl?=?0;
????int?i?=?0;
????while?(s[i]?&&?s[i]?!=?‘<‘)?i?++;
????if?(s[i])?i?++;
????while?(s[i]?&&?s[i]?!=?‘>‘)?name[nl++]?=?s[i++];
????while?(s[i]?&&?s[i]?!=?‘<‘)?i?++;
????if?(s[i])?i?++;
????while?(s[i]?&&?s[i]?!=?‘>‘)?file[fl++]?=?s[i++];
????name[nl]?=?file[fl]?=?0;
??}
}lb;
void?read_dir()?{
??FILE*?dir?=?fopen(cf+1?“r“);
secn?=?0;
while?(fgets(sec[secn++]?MAXL?dir)?!=?NULL)?{}
fclose(dir);
while?(sec[secn-1][0]?==?0?&&?secn?>?0)?secn?--;
for?(int?i?=?0;?i? if?(sec[i][strlen(sec[i])-1]?!=?0)?{
sec[i][strlen(sec[i])-1]?=?0;
}
}
}
void?file(const?char*?filename)?{
??FILE*?fp?=?fopen(filename?“r“);
??while?(fgets(temp?MAXL?fp)?!=?NULL)?fprintf(tex?temp);
??fclose(fp);
}
int?main()?{
tex?=?fopen(tf?“w“);
file(head);
??read_dir();
for?(int?i?=?0;?i? ??fprintf(tex?“\\section{%s}\n“?sec[i]);
??memcpy(temp?sec[i]?sizeof?temp);
strcat(temp?cf);
printf(“section:?%s\n“?sec[i]);
FILE*?fp?=?fopen(temp?“r“);
while(fgets(temp?MAXL?fp)?!=?NULL)?{
??if?(temp[0]?!=?‘<‘)?break;
??lb.solve(temp);
??printf(“subsection?%s?with?%s\n“?lb.name?lb.file);
??fprintf(tex?“\\subsection{%s}\n“?lb.name);
??memcpy(temp?sec[i]?sizeof?temp);
??temp[strlen(temp)+1]?=?0;
??temp[strlen(temp)]?=?‘/‘;
??strcat(temp?lb.file);
??fprintf(tex?“\\lstinputlisting{%s}\n“?temp);
}
fclose(fp);
}
file(tail);
fclose(tex);
return?0;
}


?屬性????????????大小?????日期????時(shí)間???名稱
-----------?---------??----------?-----??----
?????目錄???????????0??2015-05-09?21:00??ACM-ICPC-CodeTemplate-Latex\
?????文件??????????23??2015-05-09?21:00??ACM-ICPC-CodeTemplate-Latex\config
?????目錄???????????0??2015-05-09?21:00??ACM-ICPC-CodeTemplate-Latex\Graph\
?????文件??????????85??2015-05-09?21:00??ACM-ICPC-CodeTemplate-Latex\Graph\config
?????文件????????1209??2015-05-09?21:00??ACM-ICPC-CodeTemplate-Latex\Graph\dicnic.cpp
?????文件????????1402??2015-05-09?21:00??ACM-ICPC-CodeTemplate-Latex\Graph\km.cpp
?????文件?????????753??2015-05-09?21:00??ACM-ICPC-CodeTemplate-Latex\Graph\mixed_euler_circuit.cpp
?????文件?????????816??2015-05-09?21:00??ACM-ICPC-CodeTemplate-Latex\head
?????文件????????1767??2015-05-09?21:00??ACM-ICPC-CodeTemplate-Latex\main.cpp
?????文件?????????171??2015-05-09?21:00??ACM-ICPC-CodeTemplate-Latex\Makefile
?????目錄???????????0??2015-05-09?21:00??ACM-ICPC-CodeTemplate-Latex\Math\
?????文件????????1565??2015-05-09?21:00??ACM-ICPC-CodeTemplate-Latex\Math\config
?????文件?????????567??2015-05-09?21:00??ACM-ICPC-CodeTemplate-Latex\Math\CRT.cpp
?????文件????????1300??2015-05-09?21:00??ACM-ICPC-CodeTemplate-Latex\Math\decompose.cpp
?????文件?????????563??2015-05-09?21:00??ACM-ICPC-CodeTemplate-Latex\Math\euler_phi.cpp
?????文件?????????179??2015-05-09?21:00??ACM-ICPC-CodeTemplate-Latex\Math\exgcd.cpp
?????文件?????????187??2015-05-09?21:00??ACM-ICPC-CodeTemplate-Latex\Math\inverse.cpp
?????文件?????????388??2015-05-09?21:00??ACM-ICPC-CodeTemplate-Latex\Math\line_mod.cpp
?????文件?????????756??2015-05-09?21:00??ACM-ICPC-CodeTemplate-Latex\Math\log_mod.cpp
?????文件?????????538??2015-05-09?21:00??ACM-ICPC-CodeTemplate-Latex\Math\Lucas.cpp
?????文件?????????487??2015-05-09?21:00??ACM-ICPC-CodeTemplate-Latex\Math\Miller-Rabin.cpp
?????文件?????????326??2015-05-09?21:00??ACM-ICPC-CodeTemplate-Latex\Math\mul_mod.cpp
?????文件?????????278??2015-05-09?21:00??ACM-ICPC-CodeTemplate-Latex\Math\Pollard-Rho.cpp
?????文件?????????694??2015-05-09?21:00??ACM-ICPC-CodeTemplate-Latex\Math\power_mod.cpp
?????文件?????????185??2015-05-09?21:00??ACM-ICPC-CodeTemplate-Latex\Math\pow_mod.cpp
?????文件?????????534??2015-05-09?21:00??ACM-ICPC-CodeTemplate-Latex\Math\primitive_root.cpp
?????文件?????????679??2015-05-09?21:00??ACM-ICPC-CodeTemplate-Latex\Math\square_mod.cpp
?????目錄???????????0??2015-05-09?21:00??ACM-ICPC-CodeTemplate-Latex\Others\
?????文件??????????98??2015-05-09?21:00??ACM-ICPC-CodeTemplate-Latex\Others\config
?????文件????????2900??2015-05-09?21:00??ACM-ICPC-CodeTemplate-Latex\Others\ExactCover.cpp
?????文件?????????736??2015-05-09?21:00??ACM-ICPC-CodeTemplate-Latex\Others\matrix_pow.cpp
............此處省略12個(gè)文件信息

評(píng)論

共有 條評(píng)論