E-COM-NET
首页
在线工具
Layui镜像站
SUI文档
联系我们
推荐频道
Java
PHP
C++
C
C#
Python
Ruby
go语言
Scala
Servlet
Vue
MySQL
NoSQL
Redis
CSS
Oracle
SQL Server
DB2
HBase
Http
HTML5
Spring
Ajax
Jquery
JavaScript
Json
XML
NodeJs
mybatis
Hibernate
算法
设计模式
shell
数据结构
大数据
JS
消息中间件
正则表达式
Tomcat
SQL
Nginx
Shiro
Maven
Linux
freopen
【USACO 2.3.2】奶牛家谱
(32#include3#include4#include5#include6#include7intf[100][200];89intmain()10{11intk,n,j,i;12//文件操作13
freopen
Gregory99174
·
2020-09-16 07:29
数据结构与算法
C++随机数生成以及文件数据读取
#include#include#include#include#include#includeusingnamespacestd;intmain(){
freopen
("in.txt","r",stdin
programmy
·
2020-09-16 03:59
编程语言
uva11461 Square Numbers
//#defineZANGFONGconstintmaxn=100010;ints[maxn];intmain(){#ifdefZANGFONGfreopen("in.txt","r",stdin);
freopen
zangfong
·
2020-09-16 00:48
Tjoi2019 甲苯先生和大中锋的字符串 后缀自动机_差分
Tjoi2019甲苯先生和大中锋的字符串后缀自动机_差分tjoi胆子好大,直接出了两道送分题......都9102年了,还有省选出模板题QAQ......Code:#include#definesetIO(s)
freopen
EM-LGH
·
2020-09-15 22:07
洛谷 P4180 【模板】严格次小生成树[BJWC2010] LCT
Code://luogu-judger-enable-o2#include#include#include#includeusingnamespacestd;voidsetIO(stringa){
freopen
EM-LGH
·
2020-09-15 22:07
图的邻接表表示中删除冗余边
includeusingnamespacestd;constintmaxn=1000+10;structNode{intto;};vectoredge[maxn],edgep[maxn];intmain(){
freopen
亚里
·
2020-09-15 22:16
基础算法练习
NYoj 712 探寻宝藏[经典动态规划3](河南省第六届省赛)
a:bintdp[52][52][52][52];main(){//
freopen
("input.txt","r",stdin);intT;scanf("%d",&T);
creat2012
·
2020-09-15 20:40
Codeforces Round #155 (Div. 2) D-rats
1001][1001];intmark[1001][1001],locrat[1001][1001];intdir[4][2]={{1,0},{0,1},{-1,0},{0,-1}};intmain(){
freopen
knownothing
·
2020-09-15 13:01
bfs
c standard I/O library
◆打开与关闭文件:fopen,
freopen
,fdopen,fclose。◆读写文件bianryI/O:
dixie5304
·
2020-09-15 10:47
笔试面试算法题解之华为-成绩排序
(1#include#include#include#includeusingnamespacestd;typedefstructstudent{intid;intscore;};intmain(){
freopen
dijixiao5919
·
2020-09-15 07:40
面试
数据结构与算法
浙大PAT甲级-1016
PhoneBills1.更改文件输入输出方式:
freopen
("input.txt","r",stdin);
freopen
("output.txt","w",stdout);******//中间代码正常
zbyue_
·
2020-09-15 04:14
浙大PAT甲级练习题
2016-2017 ACM-ICPC, NEERC, Northern Subregional Contest
#includeusingnamespacestd;constintMaxn=200020;typedeflonglongLL;typedefpairpi;pia[2];intmain(){
freopen
weixin_34126215
·
2020-09-15 03:19
C++ ifstream 从文件中 字符串和数字混合输入
读入数据类似字符串+数字+字符串+数字这样循环穿插混合的类型比如下面的代码,main函数里有个while循环,无限刷菜单然后用户输入选项的那种,一开始使用
freopen
会导致缓冲区无限有数据,即无法继续输入选项了就采用
Bupt_Luke
·
2020-09-15 03:39
C++文件操作
ifstream
字符串和数字混合输入
C++
freopen
字符识别?
第一行为字符的个数n(1#includechars[5][50];intmain(){ //
freopen
("a.txt","r",stdin); intn,i,j; while(scanf
u011123263
·
2020-09-14 23:18
模拟
BZOJ 3398: [Usaco2009 Feb]Bullcow 牡牛和牝牛 水题~
水~#include#defineN100004#definemod5000011#definesetIO(s)
freopen
(s".in","r",stdin)usingnamespacestd;intf
EM-LGH
·
2020-09-14 22:59
D. Vasya and Triangle(构造)
intmain()//构造{//
freopen
("in.txt","r",stdin);llm,n,k;while(cin>>n>>m>>k){if(2*n*m%k!
DQYZhwk
·
2020-09-14 20:48
基础算法
Codeforces
pupil
【知识】输入输出.in与.out文本的生成
charin[20],out[20];for(inti=1;i<=10;i++){sprintf(in,"a%d.in",i);//输出到字符串输入in文档的数据
freopen
(in,"w",stdout
www.sqyoj.club
·
2020-09-14 19:32
BZOJ 3631: [JLOI2014]松鼠的新家 树上差分_LCA
BZOJ3631:[JLOI2014]松鼠的新家树上差分_LCACode:#include#definesetIO(s)
freopen
(s".in","r",stdin)#definemaxn300001usingnamespacestd
EM-LGH
·
2020-09-14 17:50
第15周项目一 文本中输入工资
/*从文本中输入数据*/#include#includeusingnamespacestd;intmain(){doublesalarys[500];intn=0;doublet;
freopen
("a.txt
sdhz萝卜
·
2020-09-14 15:58
第15周项目一 文本输入、输出工资
/*从文本中输入,输出数据*/#include#includeusingnamespacestd;intmain(){doublesalarys[500];intn=0;doublet;
freopen
(
sdhz萝卜
·
2020-09-14 15:58
九度OJ 题目1069:查找学生信息
includetypedefstruct{charid[100],name[100],sex[10];intage;}Student;intmain(){intN,M,i,j;charstr[100];Students[1010];
freopen
lhyer
·
2020-09-14 14:17
九度OJ
PAT-1010 一元多项式求导
include#include#include#includeusingnamespacestd;#defineMAX1000intxishu[MAX],zhishu[MAX];intmain(){//
freopen
wjzz
·
2020-09-14 06:27
PAT
BZOJ 1941: [Sdoi2010]Hide and Seek KDtree + 估价函数
defineinf1000000000usingnamespacestd;voidgetmin(int&a,intb){if(ba)a=b;}voidsetIO(strings){stringin=s+".in";stringout=s+".out";
freopen
EM-LGH
·
2020-09-14 04:14
取余运算
SampleInput2109SampleOutput2^10mod9=7#include#includeusingnamespacestd;intmain(){//
freopen
("a
Rechard_chen
·
2020-09-14 03:11
快速取模
Android托管c++的log
一方面可以可以托管这些输出到对应的AndroidNDKlog的接口中,另一方面可以重定向这些log到文件中,下面简单介绍重定向c++的log到文件中方法在JNI或者c++入口函数处,或者你想要添加的地方,添加如下代码
freopen
robinwql
·
2020-09-14 00:08
Gym 101612 Problem I. Intelligence in Perpendicularia
#includetypedeflonglongll;usingnamespacestd;constintmaxn=1e3+7;structNode{intx,y;}a[maxn];intmain(){
freopen
tomjobs
·
2020-09-13 19:39
#
gym
7-55 数列求和-加强版 (20分)
输入样例:13输出样例:123#includeusingnamespacestd;intmain(){//
freopen
("D:\\LYJ.txt","r"
lyj%
·
2020-09-13 19:45
B. Buildings(手镯问题)
手镯问题如下:intmain(){//
freopen
("in.txt","r",stdin);llm,n,c;while(cin>>n>>m>>c){llnum=quickmod(c,n*n,mod);
DQYZhwk
·
2020-09-13 19:10
Codeforces
pupil
基础数论
C++ 里利用 std::ios::sync_with_stdio(false) 解决TLE问题
includeintmain(){FILE*f=fopen("data.txt","w");for(inti=0;i#include#includeintmain(){intstart=clock();FILE*f=
freopen
打扰一下疯子
·
2020-09-13 16:30
算法
Caesar加密与解密简单实现
默认密钥K=3,加密程序#include#include#includeusingnamespacestd;intmain(){
freopen
("Caesar1.txt","r",stdin);
freopen
HowieMen
·
2020-09-13 02:47
▶︎计算机网络安全
验证身份证号码是否合理
其中的对应规则为:上一步的取余结果就是校验码数组的下标#include#includeintmain(){
freopen
("input.txt","r",stdin);intN,i,t,sum,coun
Patick Star&aiwosiwo
·
2020-09-13 00:19
笔记
存下十万(100000)以内的所有素数,方便以后打表或者哈希使用,另附筛法
#include#includeusingnamespacestd;boolvis[10000100];intmain(){
freopen
("2.txt","w",stdout);intn=10000100
三江小渡
·
2020-09-12 19:16
常用算法代码
算法理论
技巧
总结
360
include
2010
c
题目1003:A+B
=0;i='0'&&s[i]<='9')count=count*10+s[i]-'0';}if(s[0]=='-')return-1.0*count;returncount;}intmain(){//
freopen
yangchen1991
·
2020-09-12 08:31
九度OJ
c
Atcoder Grand Contest 028 简要题解
#includeusingnamespacestd;intmain(){#ifdefwxh010910
freopen
("input.txt","r",stdin);#endifintn,m;strings
wxh010910
·
2020-09-12 08:58
Atcoder Grand Contest 029 简要题解
#includeusingnamespacestd;intmain(){#ifdefwxh010910
freopen
("input.txt","r",stdin);#endifstrings;cin>>
wxh010910
·
2020-09-12 08:58
洛谷P3199 [HNOI2009]最小圈(01分数规划)
defineMP(x,y)make_pair(x,y)#definefifirst#definesesecond//#defineintlonglong#defineLLlonglong#defineFin(x){
freopen
weixin_30876945
·
2020-09-12 07:21
39、求中间数的四种方法
#include#include#includeusingnamespacestd;intmain2(){inta,b,c;
freopen
("min.in","rb",stdin);
freopen
("mid.out
qq_30272539
·
2020-09-12 06:44
算法
[AGC002E] Candy Piles - 博弈论
,问谁能必胜1#include#includeusingnamespacestd;constintmaxn=1e5+10;intn,a[maxn];intmain(www.hongtuupt.cn){
freopen
liudahai777
·
2020-09-12 06:01
C++一些函数 备用
输入输出重定向
freopen
("input.txt","r",stdin);整行输入stringa;#includegetline(cin,a);因为那个啥超时的原因,需要C语言chara[100];#
artemisrj
·
2020-09-12 02:26
C++/C
表达式求值----中缀式
inta,charOptr,intb);intcmp(charOptr1,charOptr2);intGet_OP(stack*s);voidpush(stack*s,intop);intmain(){
freopen
luomingmin
·
2020-09-11 15:58
C/C++
表达式求值
编程
中缀式
hdu1008 Elevator
表示在哪层停下,往上走一层6秒,往下走一层4表,每层停留5秒,问在一组数据下,电梯的总时间#include#includeusingnamespacestd;inta[111];intmain(){//
freopen
VNOpU2015
·
2020-09-10 22:41
hdu
水题
hdu1004 Let the Balloon Rise
水题题意:统计字符串个数,输出个数最多的字符串#include#include#includeusingnamespacestd;intmain(){
freopen
("in.txt","r",stdin
VNOpU2015
·
2020-09-10 22:41
水题
hdu
水题
UVA 401
#include#include#include#includeusingnamespacestd;intmain(){//
freopen
("input.txt","r",stdin);//
freopen
weixin_30379973
·
2020-09-10 18:24
多重背包标准二维数组做法
;intnValue,nKind;intvalue[105],weight[105],bag[105];//价值,容量,个数intnMultiplePack[105];//DPintmain(){//
freopen
昔拉天使
·
2020-09-10 16:39
ACM算法
求字典序的下一个全排列
字符串的逆转更方便一点原理:百度#include#include#includevoidrev(chars[],intl,intlen);intmain(){chars[100],temp;FILE*fp=stdout;
freopen
JoyceCoder
·
2020-08-26 14:25
c
20181025
我打
freopen
了。。。。。我不想改第二题。。。。。。。(对着代码发傻。。然后发疯。。。至某同学打完代码。。。)(诶,多大数据)恩,250吧(啥呀,500)啥!!!!!靠!!!!!
秦艺丹
·
2020-08-26 14:14
cin.get()和cin.getline()实现一行字符串(可能包含空格)cin>>遇到空格就停止输入
#includeusingnamespacestd;intmain(){
freopen
("1.txt","r",stdin);
freopen
("2.txt","w",stdout);charcin_array
戎码关山
·
2020-08-26 12:54
#
C++编程
【動態規劃】物品裝箱問題
a:b;}intmain(){
freopen
("box.in","r",stdin);
freopen
("box.out","w",stdout);scanf("%d%d",&n,&m);fo
Whjpji
·
2020-08-26 09:51
OI
CodeFroces--Joseph’s Problem
的和利用分块的思想我们知道k%i==k-k/i*i同时一段连续的区间的k/i是相等的#includeusingnamespacestd;#definemaxn#defineLLlonglongintmain(){//
freopen
dianzanji4884
·
2020-08-25 17:03
2011北京市小学生程序设计友谊赛详细答案
下面的这个程序无法得到满分:#include#includeusingnamespacestd;intmain(){
freopen
("negative.in","r",stdin);
freopen
("negative.out
海天一树X
·
2020-08-25 17:28
上一页
1
2
3
4
5
6
7
8
下一页
按字母分类:
A
B
C
D
E
F
G
H
I
J
K
L
M
N
O
P
Q
R
S
T
U
V
W
X
Y
Z
其他