diff --git a/SnackDown21/Round1A/DanceMoves.cpp b/SnackDown21/Round1A/DanceMoves.cpp new file mode 100644 index 0000000..106ebdc --- /dev/null +++ b/SnackDown21/Round1A/DanceMoves.cpp @@ -0,0 +1,34 @@ +#include +#define all(v) v.begin(), v.end() +typedef long long ll; +typedef unsigned long long ull; +using namespace std; +#define int ll +int32_t main() { + int t; + cin>>t; + while(t--){ + int x,y; + cin>>x>>y; + int dist = abs(y-x); + //cout< y + //8-3 = 5/2 =>2 sr > dist + sr = (y-x+1)/2; + if((2*sr)+x>y){ + //slide left + sl++; + } + } + + int ans = sr+sl; + if(x==y)cout<<0<