diff --git a/CMakeLists.txt b/CMakeLists.txt index dee801b..56840c1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -21,4 +21,9 @@ add_executable(P1031_pro ${CMAKE_CURRENT_LIST_DIR}/P1031/pro.cpp) add_executable(P2661 ${CMAKE_CURRENT_LIST_DIR}/P2661/main.cpp) add_executable(P2661_video ${CMAKE_CURRENT_LIST_DIR}/P2661/video.cpp) -add_executable(P2615 ${CMAKE_CURRENT_LIST_DIR}/P2615/P2615.cpp) \ No newline at end of file +add_executable(P2615 ${CMAKE_CURRENT_LIST_DIR}/P2615/P2615.cpp) + +add_executable(P7076 ${CMAKE_CURRENT_LIST_DIR}/P7076/P7076.cpp) +add_executable(P7075 ${CMAKE_CURRENT_LIST_DIR}/P7075/P7075.cpp) + +add_executable(P1003 ${CMAKE_CURRENT_LIST_DIR}/P1003/P1003.cpp) \ No newline at end of file diff --git a/P1003/P1003.cpp b/P1003/P1003.cpp new file mode 100644 index 0000000..abcc33e --- /dev/null +++ b/P1003/P1003.cpp @@ -0,0 +1,38 @@ +#include +#include + +using std::cin,std::cout; + +constexpr const auto range = std::ranges::views::iota; + +struct Point{ + int x,y; +}; + +const int MAX_N = 1e4+5; +int n; +Point dir; +Point arr[MAX_N][2]; +int ans; + +int main(){ + std::iostream::sync_with_stdio(false),cin.tie(nullptr),cout.tie(nullptr); + + cin>>n; + for(const int i:range(0,n)){ + for(const int j:range(0,2)){ + cin>>arr[i][j].x>>arr[i][j].y; + } + } + cin>>dir.x>>dir.y; + + for(const int i:range(0,n)){ + if(arr[i][0].x<=dir.x && dir.x <= arr[i][1].x + && arr[i][0].y<=dir.y && dir.y <= arr[i][1].y){ + ans++; + } + } + + std::cout<<(ans==0?-1:ans)<<"\n"; + +} \ No newline at end of file diff --git a/P7075/P7075.cpp b/P7075/P7075.cpp index bf47a33..ac3de2f 100644 --- a/P7075/P7075.cpp +++ b/P7075/P7075.cpp @@ -1,3 +1,5 @@ -// -// Created by Zengt on 2024/10/2. -// +#include + +int main(){ + +} \ No newline at end of file diff --git a/P7076/P7076.cpp b/P7076/P7076.cpp index e69de29..20db091 100644 --- a/P7076/P7076.cpp +++ b/P7076/P7076.cpp @@ -0,0 +1,5 @@ +#include + +int main(){ + +} \ No newline at end of file