입력,출력

2020. 9. 11. 13:17알고리즘/팁

헤더에 추가

#include <bits/stdc++.h>
using namespace std;

입,출력 효율적으로하기 단, scanf printf와 함께 사용못함

ios::sync_with_stdio(0);
cin.tie(0)

한줄 통째로 읽기

string s;
getline(cin,s)

데이터양을 알수없을때

while(cin>>x){

}

텍스트파일 읽을때

freopen("input.txt", "r", stdin);
freopen("output.txt", "r", stdout);

'알고리즘 > ' 카테고리의 다른 글

[Tip] 맥에서 로지텍 마우스 vscode뒤로가기  (0) 2022.10.24
[AWS-ec2] 램 용량 증설  (0) 2022.02.02
[윈도우] 경로복사  (0) 2021.10.05
부동소수점  (0) 2020.09.11