- 铺地毯(Day 1)
咋做
- 2023-10-22 18:46:26 @
不会做呀
2 comments
-
Seven7kwok LV 5 @ 2023-10-22 19:28:11
#include<cstdio> #include<iostream> using namespace std; int rug[10010][6]; int main(void){ freopen("rug.in","r",stdin); freopen("rug.out","w",stdout); int n,x,y; cin>>n; for(int i=1;i<=n;i++){ cin>>rug[i][0]>>rug[i][1]>>rug[i][2]>>rug[i][3]; } cin>>x>>y; for(int i=n;i>=1;i--){ if((x>=rug[i][0]&&x<=rug[i][0]+rug[i][2])&&(y>=rug[i][1]&&y<=rug[i][1]+rug[i][3])){ cout<<i; return 0; } } cout<<-1; return 0; }
👍 1 -
2023-10-22 19:27:50@
#include<>bits/stdc++.h> using namespace std; int rug[10010][8]; int main(){ freopen("rug.in","r",stdin); freopen("rug.out","w".stdout); int n,x,y; cin>>n; for(int i=1;i<=n;i++){ cin>>rug[i][0]>>rug[i][1]>>rug[i][2]>>rug[i][3]; } cin>>x>>y; for(i=n;i>=1;i--){ if(x>=) } return 0; }
👍 1
- 1
Information
- ID
- 1326
- Time
- 1000ms
- Memory
- 256MiB
- Difficulty
- 8
- Tags
- # Submissions
- 145
- Accepted
- 23
- Uploaded By