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
linux I/O操作 ---流文件
一、打开和关闭流FILE*fopen(constchar*pathname,constchar*mode);FILE*
freopen
(constchar*pathname,constchar*mode,
sunlin5000
·
2020-08-08 21:25
c
NOIP2015提高组解析
:i+1在i的右上方,如果已经有数了,就填在i的下方)参考程序:#include#includeusingnamespacestd;inta[50][50];intnx,ny,n;intmain(){
freopen
I_AM_HelloWord
·
2020-08-08 18:29
BZOJ 4712 洪水 动态dp(LCT+矩阵乘法)
defineN200005#definelllonglong#defineinf10000000005#definelsonp[x].ch[0]#definersonp[x].ch[1]#definesetIO(s)
freopen
EM-LGH
·
2020-08-08 17:01
LOJ #3119. 「CTS2019 | CTSC2019」随机立方体 组合计数+二项式反演
好神的一道计数题呀.code:#include#include#include#defineN5000003#definelllonglong#definemod998244353#definesetIO(s)
freopen
EM-LGH
·
2020-08-08 17:01
NOIP2016 天天爱跑步 线段树合并_桶_思维题
NOIP2016天天爱跑步线段树合并_桶_思维题竟然独自想出来了,好开心Code:#include#definesetIO(s)
freopen
(s".in","r",stdin)#definemaxn400000
EM-LGH
·
2020-08-08 17:01
luogu P4719 【模板】动态 DP 矩阵乘法_LCT
】动态DP矩阵乘法_LCTCode://luogu-judger-enable-o2//DynamicDPwithLCT#include#definelllonglong#definesetIO(s)
freopen
EM-LGH
·
2020-08-08 17:01
SPOJ 2939 QTREE5 LCT
中深度最浅,深度最深的点距离最近的白点.这样非常方便维护,进行区间合并,进行子树维护code:#include#defineN100006#defineinf1000000#definesetIO(s)
freopen
EM-LGH
·
2020-08-08 17:01
BZOJ 1180 / 2843 LCT模板题_双倍经验
热热身.结果....对照着染色敲的LCT竟然死活也调不过去(你说我抄都能抄错)干脆自己重新敲了一遍,10min就敲完了.......还是要相信自己Code:#include#definesetIO(s)
freopen
EM-LGH
·
2020-08-08 17:01
BZOJ 3639: Query on a tree VII LCT_set维护子树信息
Code:#include#include#include#include#include#definesetIO(s)
freopen
(s".in","r",stdin),
freopen
(s".out"
EM-LGH
·
2020-08-08 11:54
BZOJ 3306: 树 LCT + set 维护子树信息
可以作为LCT维护子树信息的模板,写的还是比较优美的.本地可过,bzoj时限太紧,一直TLE#include#definesetIO(s)
freopen
(s".in","r",stdin),
freopen
EM-LGH
·
2020-08-08 11:54
LOJ#3124. 「CTS2019 | CTSC2019」氪金手游 容斥+DP
include#include#include#defineN1007#definelllonglong#definemod998244353#definepbpush_back#definesetIO(s)
freopen
EM-LGH
·
2020-08-08 11:53
BZOJ5123: [Lydsy1712月赛]线段树的匹配 记忆化搜索
但是结构体的写法要注意.定义重载运算符可以有效地减小代码量.因为一个小错误调了半天,自闭了.code:#include#include#definemod998244353#definesetIO(s)
freopen
EM-LGH
·
2020-08-08 11:53
[BJOI2014]大融合 LCT维护子树信息
Code:#include#include#include#includeusingnamespacestd;voidsetIO(stringa){
freopen
((a+".in").c_str(),"
EM-LGH
·
2020-08-08 10:30
JZOJ6406. 【NOIP2019模拟11.05】小 D 与原题
Descriptionn#include#include#include#definemaxn1005usingnamespacestd;intn,i,j,k,bz[maxn][maxn];intmain(){//
freopen
YiPeng_Deng
·
2020-08-08 02:50
题解
构造
结论题
【jzoj1592】【二分】【GDKOI训练】音乐节拍
题目描述FJ准备教他的奶牛弹奏一首歌曲,歌曲由N(1#includeusingnamespacestd;intn,m,x,sum[50010],l,r;intmain(){
freopen
("mnotes.in
lnm_lym
·
2020-08-08 02:34
二分
luogu P3899 [湖南集训]谈笑风生 线段树合并
definemaxn300002#definelllonglongusingnamespacestd;voidsetIO(strings){stringin=s+".in";stringout=s+".out";
freopen
EM-LGH
·
2020-08-08 01:45
Codeforces Round #662 (Div. 2)
include2usingnamespacestd;3typedeflonglongll;4constllmaxn=2e5+100;5constllmod=1e9+7;6llt,n;78intmain(){9//
freopen
Zabreture
·
2020-08-08 01:00
第二届“传智杯”全国大学生IT技能大赛(决赛)(A~D题解)
游园会盖章题目链接这题就是个水题,哎怪我读错题了代码#include#include#include#include#include#include#include#include#includevoidfre(){
freopen
做一只大熊猫
·
2020-08-07 16:34
比赛补题总结
CH0304 IncDec Sequence (差分)
思路:(见图中解释)AC代码:#includeusingnamespacestd;typedeflonglongll;constintN=100006;lla[N],b[N];intmain(){//
freopen
RioTian
·
2020-08-07 16:00
《算法竞赛入门经典2ndEdition 》习题3-4 周期串(Periodic Strings, Uva455)
#include#include#includeusingnamespacestd;constintmaxn=80;chars[maxn+50];intmain(){//
freopen
("NewTextDocument.txt
Occupiedcsdn
·
2020-08-07 11:22
算法竞赛入门经典
uva
NOIP模拟赛 -10.25
include3#include4#definemin(a,b)ae[i].y)returnfalse;33Time+=e[i].x;34}35returntrue;36}3738inthh(){39
freopen
weixin_30685047
·
2020-08-05 20:28
noip2017 DAY1- T2
调试时出的问题:1.忘了删
freopen
(回坑的疏忽)2.很多地方是数字字符串结合输入。。。
scutbenson
·
2020-08-05 20:22
(HDU)1562-- Guess the number (猜数字)
include#include#includeusingnamespacestd;intmain(){#ifndefONLINE_JUDGEfreopen("test.txt","r",stdin);
freopen
diupouhao4253
·
2020-08-05 18:34
codeforces: Gym 101142A Anniversary Cake
代码如下:#include#include#include#includeusingnamespacestd;intmain(){
freopen
("anniversary.in","r",stdin);
linwenqidbk
·
2020-08-05 17:03
模拟
hdu 4389:打巨表
记得打表用的函数:
freopen
("E:\\out.txt","w",stdout);#include#include#include#include#defineLL
Weiguang_123
·
2020-08-05 17:46
数论
hdu
搜索
模拟
19级暑假第二场训练赛
1234AExampleInput35123453122cpp41111Output321想复杂了,直接计算平均值向上取整#includeusingnamespacestd;constintN=110;inta[N],t,n;intmain(){//
freopen
RioTian
·
2020-08-05 14:00
JZOJ 2019.06.01【NOIP普及组】模拟赛C组
而有一些“Luckydog”就是往死里钻→首先用暴力试一试,将nusingnamespacestd;intstr,n,a[2010];intmain(){//
freopen
("typewrt.in","
张殷瑞
·
2020-08-05 01:46
比赛题解
2019 CSP(NOIP) 普及组复赛 部分题目解析
2、
freopen
忘记去掉注释了。3、
freopen
里面的文件名打错。4、
freopen
打错。5、题目不会做。不废话了,上代码了#includeusingnamespacestd;intma
jzQID
·
2020-08-05 00:49
HAOI2015普及组试题
【第1题】单数还是双数(t1.c/cpp/pas)馨馨那个残酷的老师搞了一个有N(1usingnamespacestd;intmain(){
freopen
("t1.in","r",stdin);
freopen
醉梦大唐
·
2020-08-05 00:16
HAIO
POJ2876——递归
代码:#include#include#includeusingnamespacestd;constintmaxn=13;ints[maxn];stringans[maxn];intmain(){//
freopen
AndyBear
·
2020-08-04 18:28
The Lottery UVA - 10325(容斥,二进制枚举)
inta[20];intmain(){//
freopen
("in.txt","r",stdin);lln,m;while(cin>>n>>m){f(i,1,m)scanf("%d",&a[i]);llans
DQYZhwk
·
2020-08-04 17:41
基础数论
Cheerleaders UVA - 11806(容斥+组合数学)
j)C[i][j]=1;elseC[i][j]=(C[i-1][j-1]+C[i-1][j])%mod;}}}intmain(){//
freopen
("in.txt","r",stdin);intt;intn
DQYZhwk
·
2020-08-04 17:41
基础数论
E2. Asterism (Hard Version)(思维)
constintN=6e5+5;intt;intmain(){ios::sync_with_stdio(false);cin.tie(nullptr);//
freopen
("in.txt","r",stdin
DQYZhwk
·
2020-08-04 17:41
Codeforces
pupil
[洛谷 P2857][caioj 1120] 牛选牛圈 --- 二分+网络流-最大流
【问题描述】有N(1#include#include#include#defineILinline#defineINF0x7f7f7f7f#defineopen(s)
freopen
(s".in","r"
笑面蘑菇
·
2020-08-04 16:25
网络流
----图论----
[除法分块] Codeforces 830C Bamboo Partition
includeusingnamespacestd;constintmaxn=100005;typedeflonglongLL;intn,a[maxn];LLK,sum_a,now,_max,ans;intmain(){//
freopen
Lynstery
·
2020-08-04 11:01
[spoj COT - Count on a tree]树上第K小
数据范围:(N,Musingnamespacestd;#defineFIN(x)
freopen
(#x".txt","r",s
Xingw-Xiong
·
2020-08-04 11:32
ACM____主席树
ACM____数据结构
ACM____模
板
AcWing 102. 最佳牛围栏(二分)
cows[maxn];doublesum[maxn];boolCheck(doublemid){for(inti=1;iminV)returntrue;}returnfalse;}intmain(){//
freopen
125小黑黑521
·
2020-08-04 11:26
其它
进阶指南
二分——POJ3388
代码:#include#includeusingnamespacestd;constintmaxk=50000+10;intn,k;intc[maxk];intmain(){//
freopen
("j.txt
AndyBear
·
2020-08-04 11:39
二分
二分
八天集训心得
每天去吉大早8点到晚9点感觉略有疲惫,但是还是有所收获.首先先总结一些我和童鞋们常犯的错误吧.1.
freopen
没注释2.忘删调试信息3.多组数据没有换行与空格4.读题的漏洞与失误5.注意MLE6.答题时把握好策略
zyq_20030305
·
2020-08-04 10:55
总结
算法
Atcoder Grand Contest 033 简要题解
includeusingnamespacestd;constvectordx={1,0,-1,0};constvectordy={0,1,0,-1};intmain(){#ifdefwxh010910
freopen
wxh010910
·
2020-08-04 08:40
Atcoder Grand Contest 034 简要题解
#includeusingnamespacestd;intmain(){#ifdefwxh010910
freopen
("input.txt","r",stdin);#endifios::sync_with_stdio
wxh010910
·
2020-08-04 08:40
CodeForces Gym 102055 简要题解
#includeusingnamespacestd;intmain(){#ifdefwxh010910
freopen
("input.txt","r",stdin);#endifios::sync_with_stdio
wxh010910
·
2020-08-04 08:39
CodeForces Gym 102156 简要题解
#includeusingnamespacestd;intmain(){#ifdefwxh010910
freopen
("input.txt","r",stdin);#endifios::sync_with_stdio
wxh010910
·
2020-08-04 08:38
CodeForces Gym 101623 简要题解
#includeusingnamespacestd;intmain(){#ifdefwxh010910
freopen
("input.txt
wxh010910
·
2020-08-04 08:06
CodeForces Gym 101981 简要题解
#includeusingnamespacestd;intmain(){#ifdefwxh010910
freopen
("input.txt","r",stdin);#endifintn,m;scanf(
wxh010910
·
2020-08-04 08:06
codeforce-E. Superhero Battle
n,temp;lladd=0;llh0;strings1;vector>vec;llarr[N];intmain(){#ifdefLOCALfreopen("in.txt","r",stdin);//
freopen
王智峰
·
2020-08-04 06:39
cout与printf的区别
总的来说:cout带缓冲输出printf不带缓冲输出以下程序可以说明问题:#include#includemain(){inti;/*
freopen
("D:\\bb.txt","w",stdout);*
zhouchaoyuan
·
2020-08-04 02:15
ACM
P1308 统计单词数
#includeusingnamespacestd;intmain(){//
freopen
("in.txt","r",stdin);strings,t;getline(cin,s);getline(cin
是三水不是泗水
·
2020-08-03 16:01
C++/PAT/洛谷OJ
笔试题:创建一个单链表,结点包含学生的学号,姓名,性别,年龄信息.写几个程序,实现按学生学号插入,查询,删除等操作.
以下代码是LZ花两三个小时仔细斟酌的结果,用到的知识点有
freopen
()的使用,异常处理,仅供参考.如有纰漏,欢迎指正.
ajioy
·
2020-08-03 14:25
C++
C++求n以内的所有素数(n>=2)的三种方法
(可以在2~2147483647内任意改变此值)第一种常规求法:#includeusingnamespacestd;intmain(){
freopen
("d:\\HHHtemp\\test.txt","
j: )
·
2020-08-03 13:38
上一页
7
8
9
10
11
12
13
14
下一页
按字母分类:
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
其他