diff --git a/khj20006/202503/21 BOJ G4 Jigsaw of Shadows.md b/khj20006/202503/21 BOJ G4 Jigsaw of Shadows.md new file mode 100644 index 00000000..b48377d4 --- /dev/null +++ b/khj20006/202503/21 BOJ G4 Jigsaw of Shadows.md @@ -0,0 +1,31 @@ +```cpp + +#include +using namespace std; + +using ld = long double; + +int main(){ + cin.tie(0)->sync_with_stdio(0); + + int theta, N; + cin>>theta>>N; + vector> A(N); + for(auto &[x,h]:A) cin>>x>>h; + sort(A.begin(), A.end()); + + ld t = tan(M_PI * theta / 180.); + ld ans = 0, last = -1; + for(int i=0;i pos+x) continue; + if(last > x) ans += pos+x-last; + else ans += pos; + last = pos+x; + } + cout<