update
This commit is contained in:
parent
3d109047ee
commit
4ae38aa62f
3
.gitignore
vendored
3
.gitignore
vendored
@ -1,3 +1,6 @@
|
||||
/build
|
||||
/.vscode
|
||||
/.xmake
|
||||
# ---> C++
|
||||
# Prerequisites
|
||||
*.d
|
||||
|
35
20240821/P1158/P1158.cpp
Normal file
35
20240821/P1158/P1158.cpp
Normal file
@ -0,0 +1,35 @@
|
||||
#include <cctype>
|
||||
#include <cstdio>
|
||||
#include <iostream>
|
||||
#include <ostream>
|
||||
using namespace std;
|
||||
|
||||
const int MAX_N = 1e5+5;
|
||||
|
||||
struct Dir{
|
||||
Dir(int x,int y):x(x),y(y){}
|
||||
int x,y;
|
||||
friend ostream& operator<<(ostream &os,Dir d){
|
||||
os<<"Dir { x="<<d.x<<" ,y="<<d.y<<" } ";
|
||||
return os;
|
||||
}
|
||||
};
|
||||
int readInt();
|
||||
|
||||
int main(){
|
||||
|
||||
}
|
||||
|
||||
int readInt(){
|
||||
int x=0,w=1;
|
||||
char ch=0;
|
||||
while(!isdigit(ch)){
|
||||
if(ch=='-')w=-1;
|
||||
ch=getchar();
|
||||
}
|
||||
while(isdigit(ch)){
|
||||
x=x*10+(ch-'0');
|
||||
ch=getchar();
|
||||
}
|
||||
return x*w;
|
||||
}
|
Loading…
Reference in New Issue
Block a user