diff --git a/1068A Birthday/1068A.cpp b/Codes/1068A Birthday/1068A.cpp similarity index 100% rename from 1068A Birthday/1068A.cpp rename to Codes/1068A Birthday/1068A.cpp diff --git a/110A Nearly Lucky Number/110A.cpp b/Codes/110A Nearly Lucky Number/110A.cpp similarity index 100% rename from 110A Nearly Lucky Number/110A.cpp rename to Codes/110A Nearly Lucky Number/110A.cpp diff --git a/1118B Tanya and Candies/1118B.cpp b/Codes/1118B Tanya and Candies/1118B.cpp similarity index 100% rename from 1118B Tanya and Candies/1118B.cpp rename to Codes/1118B Tanya and Candies/1118B.cpp diff --git a/112A Petya And Strings/112A.cpp b/Codes/112A Petya And Strings/112A.cpp similarity index 100% rename from 112A Petya And Strings/112A.cpp rename to Codes/112A Petya And Strings/112A.cpp diff --git a/1144C Two Shuffled Sequences/1144C.cpp b/Codes/1144C Two Shuffled Sequences/1144C.cpp similarity index 100% rename from 1144C Two Shuffled Sequences/1144C.cpp rename to Codes/1144C Two Shuffled Sequences/1144C.cpp diff --git a/116A Tram/116A.cpp b/Codes/116A Tram/116A.cpp similarity index 100% rename from 116A Tram/116A.cpp rename to Codes/116A Tram/116A.cpp diff --git a/118B Present from Lena/118B.cpp b/Codes/118B Present from Lena/118B.cpp similarity index 96% rename from 118B Present from Lena/118B.cpp rename to Codes/118B Present from Lena/118B.cpp index 373f762..4794cb4 100644 --- a/118B Present from Lena/118B.cpp +++ b/Codes/118B Present from Lena/118B.cpp @@ -1,86 +1,86 @@ -#include -using namespace std; - -#define ll long long -#define ul unsigned long long -#define pb push_back -#define ss second -#define ff first -#define fr(n) for(int i=0; i=0; i--) -#define nl '\n' -#define yes cout<<"YES"<>n; - n++; - for(int i=1; i<=n; ++i) - { - int p=0; - for(int j=i; j> TC; - while (TC--) solve(); +#include +using namespace std; + +#define ll long long +#define ul unsigned long long +#define pb push_back +#define ss second +#define ff first +#define fr(n) for(int i=0; i=0; i--) +#define nl '\n' +#define yes cout<<"YES"<>n; + n++; + for(int i=1; i<=n; ++i) + { + int p=0; + for(int j=i; j> TC; + while (TC--) solve(); } \ No newline at end of file diff --git a/1196A Three Piles of Candies/1196A.cpp b/Codes/1196A Three Piles of Candies/1196A.cpp similarity index 100% rename from 1196A Three Piles of Candies/1196A.cpp rename to Codes/1196A Three Piles of Candies/1196A.cpp diff --git a/11A Increasing Sequence/11A.cpp b/Codes/11A Increasing Sequence/11A.cpp similarity index 100% rename from 11A Increasing Sequence/11A.cpp rename to Codes/11A Increasing Sequence/11A.cpp diff --git a/122A Lucky Division/122A.cpp b/Codes/122A Lucky Division/122A.cpp similarity index 100% rename from 122A Lucky Division/122A.cpp rename to Codes/122A Lucky Division/122A.cpp diff --git a/122B Lucky Substring/122B.cpp b/Codes/122B Lucky Substring/122B.cpp similarity index 100% rename from 122B Lucky Substring/122B.cpp rename to Codes/122B Lucky Substring/122B.cpp diff --git a/1295A Display The Number/1295A.cpp b/Codes/1295A Display The Number/1295A.cpp similarity index 100% rename from 1295A Display The Number/1295A.cpp rename to Codes/1295A Display The Number/1295A.cpp diff --git a/1296A Array with Odd Sum/1296A.cpp b/Codes/1296A Array with Odd Sum/1296A.cpp similarity index 100% rename from 1296A Array with Odd Sum/1296A.cpp rename to Codes/1296A Array with Odd Sum/1296A.cpp diff --git a/1311A Add Odd or Subtract Even/1311A.cpp b/Codes/1311A Add Odd or Subtract Even/1311A.cpp similarity index 100% rename from 1311A Add Odd or Subtract Even/1311A.cpp rename to Codes/1311A Add Odd or Subtract Even/1311A.cpp diff --git a/131A cAPS lOCK/131A.cpp b/Codes/131A cAPS lOCK/131A.cpp similarity index 100% rename from 131A cAPS lOCK/131A.cpp rename to Codes/131A cAPS lOCK/131A.cpp diff --git a/1328A Divisibility Problem/1328A.cpp b/Codes/1328A Divisibility Problem/1328A.cpp similarity index 97% rename from 1328A Divisibility Problem/1328A.cpp rename to Codes/1328A Divisibility Problem/1328A.cpp index 8ba5e85..7e2bf79 100644 --- a/1328A Divisibility Problem/1328A.cpp +++ b/Codes/1328A Divisibility Problem/1328A.cpp @@ -1,49 +1,49 @@ -#include -using namespace std; - -#define ll long long -#define ul unsigned long long -#define pb push_back -#define ss second -#define ff first -#define fr(n) for(int i=0; i=0; i--) -#define nl '\n' -#define yes cout<<"YES"<>x>>y; - if(x%y) - cout<> TC; - while (TC--) solve(); +#include +using namespace std; + +#define ll long long +#define ul unsigned long long +#define pb push_back +#define ss second +#define ff first +#define fr(n) for(int i=0; i=0; i--) +#define nl '\n' +#define yes cout<<"YES"<>x>>y; + if(x%y) + cout<> TC; + while (TC--) solve(); } \ No newline at end of file diff --git a/1341A Nastya and Rice/1341A.cpp b/Codes/1341A Nastya and Rice/1341A.cpp similarity index 100% rename from 1341A Nastya and Rice/1341A.cpp rename to Codes/1341A Nastya and Rice/1341A.cpp diff --git a/1343B Balanced Array/1343B.cpp b/Codes/1343B Balanced Array/1343B.cpp similarity index 100% rename from 1343B Balanced Array/1343B.cpp rename to Codes/1343B Balanced Array/1343B.cpp diff --git a/1360B Honest Coach/1360B.cpp b/Codes/1360B Honest Coach/1360B.cpp similarity index 96% rename from 1360B Honest Coach/1360B.cpp rename to Codes/1360B Honest Coach/1360B.cpp index f989b73..f618ade 100644 --- a/1360B Honest Coach/1360B.cpp +++ b/Codes/1360B Honest Coach/1360B.cpp @@ -1,56 +1,56 @@ -#include -using namespace std; - -#define ll long long -#define ul unsigned long long -#define pb push_back -#define ss second -#define ff first -#define fr(n) for(int i=0; i=0; i--) -#define nl '\n' -#define yes cout<<"YES"<>n; - vectorv(n); - fr(n) - cin>>v[i]; - sort(all(v)); - int diff=INT_MAX; - fro(n) - { - diff=min(v[i]-v[i-1],diff); - } - cout<> TC; - while (TC--) solve(); +#include +using namespace std; + +#define ll long long +#define ul unsigned long long +#define pb push_back +#define ss second +#define ff first +#define fr(n) for(int i=0; i=0; i--) +#define nl '\n' +#define yes cout<<"YES"<>n; + vectorv(n); + fr(n) + cin>>v[i]; + sort(all(v)); + int diff=INT_MAX; + fro(n) + { + diff=min(v[i]-v[i-1],diff); + } + cout<> TC; + while (TC--) solve(); } \ No newline at end of file diff --git a/1364A XXXXX/1364A.cpp b/Codes/1364A XXXXX/1364A.cpp similarity index 100% rename from 1364A XXXXX/1364A.cpp rename to Codes/1364A XXXXX/1364A.cpp diff --git a/1367B Even Array/1367B.cpp b/Codes/1367B Even Array/1367B.cpp similarity index 100% rename from 1367B Even Array/1367B.cpp rename to Codes/1367B Even Array/1367B.cpp diff --git a/136A Presents/136A.cpp b/Codes/136A Presents/136A.cpp similarity index 100% rename from 136A Presents/136A.cpp rename to Codes/136A Presents/136A.cpp diff --git a/1389A LCM Problem/1389A.cpp b/Codes/1389A LCM Problem/1389A.cpp similarity index 100% rename from 1389A LCM Problem/1389A.cpp rename to Codes/1389A LCM Problem/1389A.cpp diff --git a/1399A Remove Smallest/1399A.cpp b/Codes/1399A Remove Smallest/1399A.cpp similarity index 96% rename from 1399A Remove Smallest/1399A.cpp rename to Codes/1399A Remove Smallest/1399A.cpp index 6348311..f66ad9b 100644 --- a/1399A Remove Smallest/1399A.cpp +++ b/Codes/1399A Remove Smallest/1399A.cpp @@ -1,64 +1,64 @@ -#include -using namespace std; - -#define ll long long -#define ul unsigned long long -#define pb push_back -#define ss second -#define ff first -#define fr(m) for(int i=0; i=0; i--) -#define nl '\n' -#define yes cout<<"YES"<>n; - vectorv(n); - fr(n) cin>>v[i]; - if(n==1) - { - yes; - return; - } - sort(all(v)); - fro(n) - { - if(v[i]-v[i-1]>1) - { - no; - - return; - } - } - yes; -} - -int main() -{ - fast_io; - int TC = 1; - cin >> TC; - while (TC--) solve(); +#include +using namespace std; + +#define ll long long +#define ul unsigned long long +#define pb push_back +#define ss second +#define ff first +#define fr(m) for(int i=0; i=0; i--) +#define nl '\n' +#define yes cout<<"YES"<>n; + vectorv(n); + fr(n) cin>>v[i]; + if(n==1) + { + yes; + return; + } + sort(all(v)); + fro(n) + { + if(v[i]-v[i-1]>1) + { + no; + + return; + } + } + yes; +} + +int main() +{ + fast_io; + int TC = 1; + cin >> TC; + while (TC--) solve(); } \ No newline at end of file diff --git a/141A Amusing Joke/141A.cpp b/Codes/141A Amusing Joke/141A.cpp similarity index 100% rename from 141A Amusing Joke/141A.cpp rename to Codes/141A Amusing Joke/141A.cpp diff --git a/1426A Floor Number/1426A.cpp b/Codes/1426A Floor Number/1426A.cpp similarity index 100% rename from 1426A Floor Number/1426A.cpp rename to Codes/1426A Floor Number/1426A.cpp diff --git a/144A Arrival of the General/144A.cpp b/Codes/144A Arrival of the General/144A.cpp similarity index 100% rename from 144A Arrival of the General/144A.cpp rename to Codes/144A Arrival of the General/144A.cpp diff --git a/148A Insomnia cure/148A.cpp b/Codes/148A Insomnia cure/148A.cpp similarity index 100% rename from 148A Insomnia cure/148A.cpp rename to Codes/148A Insomnia cure/148A.cpp diff --git a/1512A Spy Detected!/1512A.cpp b/Codes/1512A Spy Detected!/1512A.cpp similarity index 100% rename from 1512A Spy Detected!/1512A.cpp rename to Codes/1512A Spy Detected!/1512A.cpp diff --git a/151A Soft Drinking/151A.cpp b/Codes/151A Soft Drinking/151A.cpp similarity index 100% rename from 151A Soft Drinking/151A.cpp rename to Codes/151A Soft Drinking/151A.cpp diff --git a/155A - I_love_%username%/155A.cpp b/Codes/155A - I_love_%username%/155A.cpp similarity index 100% rename from 155A - I_love_%username%/155A.cpp rename to Codes/155A - I_love_%username%/155A.cpp diff --git a/1582B Luntik and Subsequences/1582B.cpp b/Codes/1582B Luntik and Subsequences/1582B.cpp similarity index 100% rename from 1582B Luntik and Subsequences/1582B.cpp rename to Codes/1582B Luntik and Subsequences/1582B.cpp diff --git a/158A Next Round/158A.cpp b/Codes/158A Next Round/158A.cpp similarity index 100% rename from 158A Next Round/158A.cpp rename to Codes/158A Next Round/158A.cpp diff --git a/158B Taxi/158B.cpp b/Codes/158B Taxi/158B.cpp similarity index 100% rename from 158B Taxi/158B.cpp rename to Codes/158B Taxi/158B.cpp diff --git a/1624B Make AP/1624B.cpp b/Codes/1624B Make AP/1624B.cpp similarity index 100% rename from 1624B Make AP/1624B.cpp rename to Codes/1624B Make AP/1624B.cpp diff --git a/1633A Div. 7/1633A.cpp b/Codes/1633A Div. 7/1633A.cpp similarity index 100% rename from 1633A Div. 7/1633A.cpp rename to Codes/1633A Div. 7/1633A.cpp diff --git a/1676A Lucky/1676A.cpp b/Codes/1676A Lucky/1676A.cpp similarity index 100% rename from 1676A Lucky/1676A.cpp rename to Codes/1676A Lucky/1676A.cpp diff --git a/1692A Marathon/1692A.cpp b/Codes/1692A Marathon/1692A.cpp similarity index 100% rename from 1692A Marathon/1692A.cpp rename to Codes/1692A Marathon/1692A.cpp diff --git a/1703A YES or YES/1703A.cpp b/Codes/1703A YES or YES/1703A.cpp similarity index 96% rename from 1703A YES or YES/1703A.cpp rename to Codes/1703A YES or YES/1703A.cpp index c1d2966..3c8cf39 100644 --- a/1703A YES or YES/1703A.cpp +++ b/Codes/1703A YES or YES/1703A.cpp @@ -1,52 +1,52 @@ -#include -using namespace std; - -#define ll long long -#define ul unsigned long long -#define pb push_back -#define ss second -#define ff first -#define fr(n) for(int i=0; i=0; i--) -#define nl '\n' -#define yes cout<<"YES"<>s; - for(auto &c:s) - c=tolower(c); - if(s=="yes") - yes; - else - no; -} - -int main() -{ - fast_io; - int TC = 1; - cin >> TC; - while (TC--) solve(); +#include +using namespace std; + +#define ll long long +#define ul unsigned long long +#define pb push_back +#define ss second +#define ff first +#define fr(n) for(int i=0; i=0; i--) +#define nl '\n' +#define yes cout<<"YES"<>s; + for(auto &c:s) + c=tolower(c); + if(s=="yes") + yes; + else + no; +} + +int main() +{ + fast_io; + int TC = 1; + cin >> TC; + while (TC--) solve(); } \ No newline at end of file diff --git a/1719A Chip Game/1719A.cpp b/Codes/1719A Chip Game/1719A.cpp similarity index 100% rename from 1719A Chip Game/1719A.cpp rename to Codes/1719A Chip Game/1719A.cpp diff --git a/1719B Mathematical Circus/1719B.cpp b/Codes/1719B Mathematical Circus/1719B.cpp similarity index 100% rename from 1719B Mathematical Circus/1719B.cpp rename to Codes/1719B Mathematical Circus/1719B.cpp diff --git a/1721B Deadly Laser/1721B.cpp b/Codes/1721B Deadly Laser/1721B.cpp similarity index 100% rename from 1721B Deadly Laser/1721B.cpp rename to Codes/1721B Deadly Laser/1721B.cpp diff --git a/1742A Sum/1742A.cpp b/Codes/1742A Sum/1742A.cpp similarity index 100% rename from 1742A Sum/1742A.cpp rename to Codes/1742A Sum/1742A.cpp diff --git a/1742C Stripes/1742C.cpp b/Codes/1742C Stripes/1742C.cpp similarity index 100% rename from 1742C Stripes/1742C.cpp rename to Codes/1742C Stripes/1742C.cpp diff --git a/1746B Rebellion/1746B.cpp b/Codes/1746B Rebellion/1746B.cpp similarity index 100% rename from 1746B Rebellion/1746B.cpp rename to Codes/1746B Rebellion/1746B.cpp diff --git a/1748A The Ultimate Square/1748A.cpp b/Codes/1748A The Ultimate Square/1748A.cpp similarity index 100% rename from 1748A The Ultimate Square/1748A.cpp rename to Codes/1748A The Ultimate Square/1748A.cpp diff --git a/1758B XOR = Average/1758B.cpp b/Codes/1758B XOR = Average/1758B.cpp similarity index 100% rename from 1758B XOR = Average/1758B.cpp rename to Codes/1758B XOR = Average/1758B.cpp diff --git a/1760A Medium Number/1760A.cpp b/Codes/1760A Medium Number/1760A.cpp similarity index 100% rename from 1760A Medium Number/1760A.cpp rename to Codes/1760A Medium Number/1760A.cpp diff --git a/1773F Football/1773F.cpp b/Codes/1773F Football/1773F.cpp similarity index 100% rename from 1773F Football/1773F.cpp rename to Codes/1773F Football/1773F.cpp diff --git a/1791B Following Directions/1791B.cpp b/Codes/1791B Following Directions/1791B.cpp similarity index 100% rename from 1791B Following Directions/1791B.cpp rename to Codes/1791B Following Directions/1791B.cpp diff --git a/1792A Gaming Forces/1792A.cpp b/Codes/1792A Gaming Forces/1792A.cpp similarity index 100% rename from 1792A Gaming Forces/1792A.cpp rename to Codes/1792A Gaming Forces/1792A.cpp diff --git a/1795B Ideal Point/1795B.cpp b/Codes/1795B Ideal Point/1795B.cpp similarity index 100% rename from 1795B Ideal Point/1795B.cpp rename to Codes/1795B Ideal Point/1795B.cpp diff --git a/1800A Is It a Cat/1800A.cpp b/Codes/1800A Is It a Cat/1800A.cpp similarity index 100% rename from 1800A Is It a Cat/1800A.cpp rename to Codes/1800A Is It a Cat/1800A.cpp diff --git a/1811A Insert Digit/1811A.cpp b/Codes/1811A Insert Digit/1811A.cpp similarity index 100% rename from 1811A Insert Digit/1811A.cpp rename to Codes/1811A Insert Digit/1811A.cpp diff --git a/1814A Coins/1814A.cpp b/Codes/1814A Coins/1814A.cpp similarity index 100% rename from 1814A Coins/1814A.cpp rename to Codes/1814A Coins/1814A.cpp diff --git a/1818B Indivisible/1818B.cpp b/Codes/1818B Indivisible/1818B.cpp similarity index 100% rename from 1818B Indivisible/1818B.cpp rename to Codes/1818B Indivisible/1818B.cpp diff --git a/1822A TubeTube Feed/1822A.cpp b/Codes/1822A TubeTube Feed/1822A.cpp similarity index 100% rename from 1822A TubeTube Feed/1822A.cpp rename to Codes/1822A TubeTube Feed/1822A.cpp diff --git a/1822C Bun Lover/1822C.cpp b/Codes/1822C Bun Lover/1822C.cpp similarity index 97% rename from 1822C Bun Lover/1822C.cpp rename to Codes/1822C Bun Lover/1822C.cpp index 332b6a1..35d45fc 100644 --- a/1822C Bun Lover/1822C.cpp +++ b/Codes/1822C Bun Lover/1822C.cpp @@ -1,47 +1,47 @@ -#include -using namespace std; - -#define ll long long -#define ul unsigned long long -#define pb push_back -#define ss second -#define ff first -#define fr(n) for(int i=0; i=0; i--) -#define nl '\n' -#define yes cout<<"YES"<>n; - cout<> TC; - while (TC--) solve(); +#include +using namespace std; + +#define ll long long +#define ul unsigned long long +#define pb push_back +#define ss second +#define ff first +#define fr(n) for(int i=0; i=0; i--) +#define nl '\n' +#define yes cout<<"YES"<>n; + cout<> TC; + while (TC--) solve(); } \ No newline at end of file diff --git a/1828A Divisible Array/1828A.cpp b/Codes/1828A Divisible Array/1828A.cpp similarity index 100% rename from 1828A Divisible Array/1828A.cpp rename to Codes/1828A Divisible Array/1828A.cpp diff --git a/1828B Permutation Swap/1828B.cpp b/Codes/1828B Permutation Swap/1828B.cpp similarity index 100% rename from 1828B Permutation Swap/1828B.cpp rename to Codes/1828B Permutation Swap/1828B.cpp diff --git a/1829A Love Story/1829A.cpp b/Codes/1829A Love Story/1829A.cpp similarity index 100% rename from 1829A Love Story/1829A.cpp rename to Codes/1829A Love Story/1829A.cpp diff --git a/1829B Blank Spaces/1829B.cpp b/Codes/1829B Blank Spaces/1829B.cpp similarity index 100% rename from 1829B Blank Spaces/1829B.cpp rename to Codes/1829B Blank Spaces/1829B.cpp diff --git a/1829C Mr. Perfectly Fine/1829C.cpp b/Codes/1829C Mr. Perfectly Fine/1829C.cpp similarity index 100% rename from 1829C Mr. Perfectly Fine/1829C.cpp rename to Codes/1829C Mr. Perfectly Fine/1829C.cpp diff --git a/1829D Gold Rush/1829D.cpp b/Codes/1829D Gold Rush/1829D.cpp similarity index 100% rename from 1829D Gold Rush/1829D.cpp rename to Codes/1829D Gold Rush/1829D.cpp diff --git a/1832A New Palindrome/1832A.cpp b/Codes/1832A New Palindrome/1832A.cpp similarity index 100% rename from 1832A New Palindrome/1832A.cpp rename to Codes/1832A New Palindrome/1832A.cpp diff --git a/1833A Musical Puzzle/1833A.cpp b/Codes/1833A Musical Puzzle/1833A.cpp similarity index 100% rename from 1833A Musical Puzzle/1833A.cpp rename to Codes/1833A Musical Puzzle/1833A.cpp diff --git a/1833B Restore the Weather/1833B.cpp b/Codes/1833B Restore the Weather/1833B.cpp similarity index 100% rename from 1833B Restore the Weather/1833B.cpp rename to Codes/1833B Restore the Weather/1833B.cpp diff --git a/1833C Vlad Building Beautiful Array/1833C.cpp b/Codes/1833C Vlad Building Beautiful Array/1833C.cpp similarity index 100% rename from 1833C Vlad Building Beautiful Array/1833C.cpp rename to Codes/1833C Vlad Building Beautiful Array/1833C.cpp diff --git a/1837A Grasshopper on a Line/1837A.cpp b/Codes/1837A Grasshopper on a Line/1837A.cpp similarity index 97% rename from 1837A Grasshopper on a Line/1837A.cpp rename to Codes/1837A Grasshopper on a Line/1837A.cpp index 17356bf..cf8ddf7 100644 --- a/1837A Grasshopper on a Line/1837A.cpp +++ b/Codes/1837A Grasshopper on a Line/1837A.cpp @@ -1,50 +1,50 @@ -#include -using namespace std; - -#define ll long long -#define ul unsigned long long -#define pb push_back -#define ss second -#define ff first -#define fr(n) for(int i=0; i=0; i--) -#define nl '\n' -#define yes cout<<"YES"<>x>>k; - if(x%k!=0) - cout<<1<> TC; - while (TC--) solve(); +#include +using namespace std; + +#define ll long long +#define ul unsigned long long +#define pb push_back +#define ss second +#define ff first +#define fr(n) for(int i=0; i=0; i--) +#define nl '\n' +#define yes cout<<"YES"<>x>>k; + if(x%k!=0) + cout<<1<> TC; + while (TC--) solve(); } \ No newline at end of file diff --git a/1837B Comparison String/1837B.cpp b/Codes/1837B Comparison String/1837B.cpp similarity index 100% rename from 1837B Comparison String/1837B.cpp rename to Codes/1837B Comparison String/1837B.cpp diff --git a/1841B Keep it Beautiful/1841B.cpp b/Codes/1841B Keep it Beautiful/1841B.cpp similarity index 100% rename from 1841B Keep it Beautiful/1841B.cpp rename to Codes/1841B Keep it Beautiful/1841B.cpp diff --git a/1843A Sasha and Array Coloring/1843A.cpp b/Codes/1843A Sasha and Array Coloring/1843A.cpp similarity index 100% rename from 1843A Sasha and Array Coloring/1843A.cpp rename to Codes/1843A Sasha and Array Coloring/1843A.cpp diff --git a/1843B Long Long/1843B.cpp b/Codes/1843B Long Long/1843B.cpp similarity index 100% rename from 1843B Long Long/1843B.cpp rename to Codes/1843B Long Long/1843B.cpp diff --git a/1844A Subtraction Game/1844A.cpp b/Codes/1844A Subtraction Game/1844A.cpp similarity index 100% rename from 1844A Subtraction Game/1844A.cpp rename to Codes/1844A Subtraction Game/1844A.cpp diff --git a/1845A Forbidden Integer/1845A.cpp b/Codes/1845A Forbidden Integer/1845A.cpp similarity index 100% rename from 1845A Forbidden Integer/1845A.cpp rename to Codes/1845A Forbidden Integer/1845A.cpp diff --git a/1846A Rudolph and Cut the Rope/1846A.cpp b/Codes/1846A Rudolph and Cut the Rope/1846A.cpp similarity index 100% rename from 1846A Rudolph and Cut the Rope/1846A.cpp rename to Codes/1846A Rudolph and Cut the Rope/1846A.cpp diff --git a/1846B Rudolph and Tic-Tac-Toe/1846B.cpp b/Codes/1846B Rudolph and Tic-Tac-Toe/1846B.cpp similarity index 100% rename from 1846B Rudolph and Tic-Tac-Toe/1846B.cpp rename to Codes/1846B Rudolph and Tic-Tac-Toe/1846B.cpp diff --git a/1846C Rudolf and the Another Competition/1846C.cpp b/Codes/1846C Rudolf and the Another Competition/1846C.cpp similarity index 100% rename from 1846C Rudolf and the Another Competition/1846C.cpp rename to Codes/1846C Rudolf and the Another Competition/1846C.cpp diff --git a/1848A Vika and Her Friends/1848A.cpp b/Codes/1848A Vika and Her Friends/1848A.cpp similarity index 100% rename from 1848A Vika and Her Friends/1848A.cpp rename to Codes/1848A Vika and Her Friends/1848A.cpp diff --git a/1849A Morning Sandwich/1849A.cpp b/Codes/1849A Morning Sandwich/1849A.cpp similarity index 100% rename from 1849A Morning Sandwich/1849A.cpp rename to Codes/1849A Morning Sandwich/1849A.cpp diff --git a/1849B Monsters/1849B.cpp b/Codes/1849B Monsters/1849B.cpp similarity index 100% rename from 1849B Monsters/1849B.cpp rename to Codes/1849B Monsters/1849B.cpp diff --git a/1850A To My Critics/1850A.cpp b/Codes/1850A To My Critics/1850A.cpp similarity index 100% rename from 1850A To My Critics/1850A.cpp rename to Codes/1850A To My Critics/1850A.cpp diff --git a/1850B Ten Words of Wisdom/1850B.cpp b/Codes/1850B Ten Words of Wisdom/1850B.cpp similarity index 100% rename from 1850B Ten Words of Wisdom/1850B.cpp rename to Codes/1850B Ten Words of Wisdom/1850B.cpp diff --git a/1850C Word on the Paper/1850C.cpp b/Codes/1850C Word on the Paper/1850C.cpp similarity index 100% rename from 1850C Word on the Paper/1850C.cpp rename to Codes/1850C Word on the Paper/1850C.cpp diff --git a/1850D Balanced Round/1850D.cpp b/Codes/1850D Balanced Round/1850D.cpp similarity index 96% rename from 1850D Balanced Round/1850D.cpp rename to Codes/1850D Balanced Round/1850D.cpp index d3b8e02..fa0f16e 100644 --- a/1850D Balanced Round/1850D.cpp +++ b/Codes/1850D Balanced Round/1850D.cpp @@ -1,63 +1,63 @@ -#include -using namespace std; - -#define ll long long -#define ul unsigned long long -#define pb push_back -#define ss second -#define ff first -#define fr(n) for(int i=0; i=0; i--) -#define nl '\n' -#define yes cout<<"YES"<>n>>k; - vectorv(n); - fr(n) cin>>v[i]; - int mx=0,ct=1; - sort(all(v)); - fro(n) - { - int d=v[i]-v[i-1]; - if(d<=k) - ct++; - else - { - mx=max(mx,ct); - ct=1; - } - } - mx=max(mx,ct); - cout<> TC; - while (TC--) solve(); +#include +using namespace std; + +#define ll long long +#define ul unsigned long long +#define pb push_back +#define ss second +#define ff first +#define fr(n) for(int i=0; i=0; i--) +#define nl '\n' +#define yes cout<<"YES"<>n>>k; + vectorv(n); + fr(n) cin>>v[i]; + int mx=0,ct=1; + sort(all(v)); + fro(n) + { + int d=v[i]-v[i-1]; + if(d<=k) + ct++; + else + { + mx=max(mx,ct); + ct=1; + } + } + mx=max(mx,ct); + cout<> TC; + while (TC--) solve(); } \ No newline at end of file diff --git a/1851A Escalator Conversations/1851A.cpp b/Codes/1851A Escalator Conversations/1851A.cpp similarity index 100% rename from 1851A Escalator Conversations/1851A.cpp rename to Codes/1851A Escalator Conversations/1851A.cpp diff --git a/1851B Parity Sort/1851B.cpp b/Codes/1851B Parity Sort/1851B.cpp similarity index 100% rename from 1851B Parity Sort/1851B.cpp rename to Codes/1851B Parity Sort/1851B.cpp diff --git a/1851C Tiles Comeback/1851C.cpp b/Codes/1851C Tiles Comeback/1851C.cpp similarity index 100% rename from 1851C Tiles Comeback/1851C.cpp rename to Codes/1851C Tiles Comeback/1851C.cpp diff --git a/1853A Desorting/1853A.cpp b/Codes/1853A Desorting/1853A.cpp similarity index 100% rename from 1853A Desorting/1853A.cpp rename to Codes/1853A Desorting/1853A.cpp diff --git a/1855A Dalton the Teacher/1855A.cpp b/Codes/1855A Dalton the Teacher/1855A.cpp similarity index 100% rename from 1855A Dalton the Teacher/1855A.cpp rename to Codes/1855A Dalton the Teacher/1855A.cpp diff --git a/1856B Good Arrays/1856B.cpp b/Codes/1856B Good Arrays/1856B.cpp similarity index 100% rename from 1856B Good Arrays/1856B.cpp rename to Codes/1856B Good Arrays/1856B.cpp diff --git a/1857A Array Coloring/1857A.cpp b/Codes/1857A Array Coloring/1857A.cpp similarity index 96% rename from 1857A Array Coloring/1857A.cpp rename to Codes/1857A Array Coloring/1857A.cpp index f564eb3..03e571c 100644 --- a/1857A Array Coloring/1857A.cpp +++ b/Codes/1857A Array Coloring/1857A.cpp @@ -1,57 +1,57 @@ -#include -using namespace std; - -#define ll long long -#define ul unsigned long long -#define pb push_back -#define ss second -#define ff first -#define fr(n) for(int i=0; i=0; i--) -#define nl '\n' -#define yes cout<<"YES"<>n; - int sum=0; - fr(n) - { - int x; - cin>>x; - sum+=x; - } - if(sum&1) - no; - else - yes; -} - -int main() -{ - fast_io; - int TC = 1; - cin >> TC; - while (TC--) solve(); +#include +using namespace std; + +#define ll long long +#define ul unsigned long long +#define pb push_back +#define ss second +#define ff first +#define fr(n) for(int i=0; i=0; i--) +#define nl '\n' +#define yes cout<<"YES"<>n; + int sum=0; + fr(n) + { + int x; + cin>>x; + sum+=x; + } + if(sum&1) + no; + else + yes; +} + +int main() +{ + fast_io; + int TC = 1; + cin >> TC; + while (TC--) solve(); } \ No newline at end of file diff --git a/1857B Maximum Rounding/1857B.cpp b/Codes/1857B Maximum Rounding/1857B.cpp similarity index 100% rename from 1857B Maximum Rounding/1857B.cpp rename to Codes/1857B Maximum Rounding/1857B.cpp diff --git a/1857C Assembly via Minimums/1857C.cpp b/Codes/1857C Assembly via Minimums/1857C.cpp similarity index 100% rename from 1857C Assembly via Minimums/1857C.cpp rename to Codes/1857C Assembly via Minimums/1857C.cpp diff --git a/1858A Buttons/1858A.cpp b/Codes/1858A Buttons/1858A.cpp similarity index 100% rename from 1858A Buttons/1858A.cpp rename to Codes/1858A Buttons/1858A.cpp diff --git a/1859A United We Stand/1859A.cpp b/Codes/1859A United We Stand/1859A.cpp similarity index 100% rename from 1859A United We Stand/1859A.cpp rename to Codes/1859A United We Stand/1859A.cpp diff --git a/1862A Gift Carpet/1862A.cpp b/Codes/1862A Gift Carpet/1862A.cpp similarity index 100% rename from 1862A Gift Carpet/1862A.cpp rename to Codes/1862A Gift Carpet/1862A.cpp diff --git a/1862B Sequence Game/1862B.cpp b/Codes/1862B Sequence Game/1862B.cpp similarity index 100% rename from 1862B Sequence Game/1862B.cpp rename to Codes/1862B Sequence Game/1862B.cpp diff --git a/1863A Channel/1863A.cpp b/Codes/1863A Channel/1863A.cpp similarity index 100% rename from 1863A Channel/1863A.cpp rename to Codes/1863A Channel/1863A.cpp diff --git a/1864A Increasing and Decreasing/1864A.cpp b/Codes/1864A Increasing and Decreasing/1864A.cpp similarity index 100% rename from 1864A Increasing and Decreasing/1864A.cpp rename to Codes/1864A Increasing and Decreasing/1864A.cpp diff --git a/1866A Ambitious Kid/1866A.cpp b/Codes/1866A Ambitious Kid/1866A.cpp similarity index 100% rename from 1866A Ambitious Kid/1866A.cpp rename to Codes/1866A Ambitious Kid/1866A.cpp diff --git a/1869A Make It Zero/1869A.cpp b/Codes/1869A Make It Zero/1869A.cpp similarity index 100% rename from 1869A Make It Zero/1869A.cpp rename to Codes/1869A Make It Zero/1869A.cpp diff --git a/1870A MEXanized Array/1870A.cpp b/Codes/1870A MEXanized Array/1870A.cpp similarity index 100% rename from 1870A MEXanized Array/1870A.cpp rename to Codes/1870A MEXanized Array/1870A.cpp diff --git a/1872A Two Vessels/1872A.cpp b/Codes/1872A Two Vessels/1872A.cpp similarity index 100% rename from 1872A Two Vessels/1872A.cpp rename to Codes/1872A Two Vessels/1872A.cpp diff --git a/1872B The Corridor or There and Back Again/1872B.cpp b/Codes/1872B The Corridor or There and Back Again/1872B.cpp similarity index 100% rename from 1872B The Corridor or There and Back Again/1872B.cpp rename to Codes/1872B The Corridor or There and Back Again/1872B.cpp diff --git a/1872C Non-coprime Split/1872C.cpp b/Codes/1872C Non-coprime Split/1872C.cpp similarity index 100% rename from 1872C Non-coprime Split/1872C.cpp rename to Codes/1872C Non-coprime Split/1872C.cpp diff --git a/1873A Short Sort/1873A.cpp b/Codes/1873A Short Sort/1873A.cpp similarity index 100% rename from 1873A Short Sort/1873A.cpp rename to Codes/1873A Short Sort/1873A.cpp diff --git a/1873B Good Kid/1873B.cpp b/Codes/1873B Good Kid/1873B.cpp similarity index 100% rename from 1873B Good Kid/1873B.cpp rename to Codes/1873B Good Kid/1873B.cpp diff --git a/1873C Target Practice/1873C.cpp b/Codes/1873C Target Practice/1873C.cpp similarity index 100% rename from 1873C Target Practice/1873C.cpp rename to Codes/1873C Target Practice/1873C.cpp diff --git a/1873D 1D Eraser/1873D.cpp b/Codes/1873D 1D Eraser/1873D.cpp similarity index 100% rename from 1873D 1D Eraser/1873D.cpp rename to Codes/1873D 1D Eraser/1873D.cpp diff --git a/1875A Jellyfish and Undertale/1875A.cpp b/Codes/1875A Jellyfish and Undertale/1875A.cpp similarity index 100% rename from 1875A Jellyfish and Undertale/1875A.cpp rename to Codes/1875A Jellyfish and Undertale/1875A.cpp diff --git a/1878A How Much Does Daytona Cost/1878A.cpp b/Codes/1878A How Much Does Daytona Cost/1878A.cpp similarity index 100% rename from 1878A How Much Does Daytona Cost/1878A.cpp rename to Codes/1878A How Much Does Daytona Cost/1878A.cpp diff --git a/1878B Aleksa and Stack/1878B.cpp b/Codes/1878B Aleksa and Stack/1878B.cpp similarity index 100% rename from 1878B Aleksa and Stack/1878B.cpp rename to Codes/1878B Aleksa and Stack/1878B.cpp diff --git a/1878C Vasilije in Cacak/1878C.cpp b/Codes/1878C Vasilije in Cacak/1878C.cpp similarity index 100% rename from 1878C Vasilije in Cacak/1878C.cpp rename to Codes/1878C Vasilije in Cacak/1878C.cpp diff --git a/1879A Rigged!/1879A.cpp b/Codes/1879A Rigged!/1879A.cpp similarity index 100% rename from 1879A Rigged!/1879A.cpp rename to Codes/1879A Rigged!/1879A.cpp diff --git a/1879B Chips on the Board/1879B.cpp b/Codes/1879B Chips on the Board/1879B.cpp similarity index 100% rename from 1879B Chips on the Board/1879B.cpp rename to Codes/1879B Chips on the Board/1879B.cpp diff --git a/1881A Don't Try to Count/1881A.cpp b/Codes/1881A Don't Try to Count/1881A.cpp similarity index 100% rename from 1881A Don't Try to Count/1881A.cpp rename to Codes/1881A Don't Try to Count/1881A.cpp diff --git a/1881B Three Threadlets/1881B.cpp b/Codes/1881B Three Threadlets/1881B.cpp similarity index 100% rename from 1881B Three Threadlets/1881B.cpp rename to Codes/1881B Three Threadlets/1881B.cpp diff --git a/1881C Perfect Square/1881C.cpp b/Codes/1881C Perfect Square/1881C.cpp similarity index 100% rename from 1881C Perfect Square/1881C.cpp rename to Codes/1881C Perfect Square/1881C.cpp diff --git a/1883B Chemistry/1883B.cpp b/Codes/1883B Chemistry/1883B.cpp similarity index 100% rename from 1883B Chemistry/1883B.cpp rename to Codes/1883B Chemistry/1883B.cpp diff --git a/1894A Secret Sport/1894A.cpp b/Codes/1894A Secret Sport/1894A.cpp similarity index 100% rename from 1894A Secret Sport/1894A.cpp rename to Codes/1894A Secret Sport/1894A.cpp diff --git a/1895A Treasure Chest/1895A.cpp b/Codes/1895A Treasure Chest/1895A.cpp similarity index 100% rename from 1895A Treasure Chest/1895A.cpp rename to Codes/1895A Treasure Chest/1895A.cpp diff --git a/1895B Points and Minimum Distance/1895B.cpp b/Codes/1895B Points and Minimum Distance/1895B.cpp similarity index 100% rename from 1895B Points and Minimum Distance/1895B.cpp rename to Codes/1895B Points and Minimum Distance/1895B.cpp diff --git a/1896A Jagged Swaps/1896A.cpp b/Codes/1896A Jagged Swaps/1896A.cpp similarity index 100% rename from 1896A Jagged Swaps/1896A.cpp rename to Codes/1896A Jagged Swaps/1896A.cpp diff --git a/1896B AB Flipping/1896B.cpp b/Codes/1896B AB Flipping/1896B.cpp similarity index 100% rename from 1896B AB Flipping/1896B.cpp rename to Codes/1896B AB Flipping/1896B.cpp diff --git a/1898A Milica and String/1898A.cpp b/Codes/1898A Milica and String/1898A.cpp similarity index 100% rename from 1898A Milica and String/1898A.cpp rename to Codes/1898A Milica and String/1898A.cpp diff --git a/1899A Game with Integers/1899A.cpp b/Codes/1899A Game with Integers/1899A.cpp similarity index 100% rename from 1899A Game with Integers/1899A.cpp rename to Codes/1899A Game with Integers/1899A.cpp diff --git a/189A Cut Ribbon/189A.cpp b/Codes/189A Cut Ribbon/189A.cpp similarity index 100% rename from 189A Cut Ribbon/189A.cpp rename to Codes/189A Cut Ribbon/189A.cpp diff --git a/1900A Cover in Water/1900A.cpp b/Codes/1900A Cover in Water/1900A.cpp similarity index 100% rename from 1900A Cover in Water/1900A.cpp rename to Codes/1900A Cover in Water/1900A.cpp diff --git a/1900B Laura and Operations/1900B.cpp b/Codes/1900B Laura and Operations/1900B.cpp similarity index 100% rename from 1900B Laura and Operations/1900B.cpp rename to Codes/1900B Laura and Operations/1900B.cpp diff --git a/1901A Line Trip/1901A.cpp b/Codes/1901A Line Trip/1901A.cpp similarity index 100% rename from 1901A Line Trip/1901A.cpp rename to Codes/1901A Line Trip/1901A.cpp diff --git a/1904A Forked!/1904A.cpp b/Codes/1904A Forked!/1904A.cpp similarity index 100% rename from 1904A Forked!/1904A.cpp rename to Codes/1904A Forked!/1904A.cpp diff --git a/1907A Rook/1907A.cpp b/Codes/1907A Rook/1907A.cpp similarity index 100% rename from 1907A Rook/1907A.cpp rename to Codes/1907A Rook/1907A.cpp diff --git a/1907B YetnotherrokenKeoard/1907B.cpp b/Codes/1907B YetnotherrokenKeoard/1907B.cpp similarity index 100% rename from 1907B YetnotherrokenKeoard/1907B.cpp rename to Codes/1907B YetnotherrokenKeoard/1907B.cpp diff --git a/1907C Removal of Unattractive Pairs/1907C.cpp b/Codes/1907C Removal of Unattractive Pairs/1907C.cpp similarity index 100% rename from 1907C Removal of Unattractive Pairs/1907C.cpp rename to Codes/1907C Removal of Unattractive Pairs/1907C.cpp diff --git a/200B Drinks/200B.cpp b/Codes/200B Drinks/200B.cpp similarity index 96% rename from 200B Drinks/200B.cpp rename to Codes/200B Drinks/200B.cpp index 0770e52..0dd8117 100644 --- a/200B Drinks/200B.cpp +++ b/Codes/200B Drinks/200B.cpp @@ -1,56 +1,56 @@ -#include -using namespace std; - -#define ll long long -#define ul unsigned long long -#define pb push_back -#define ss second -#define ff first -#define fr(n) for(int i=0; i=0; i--) -#define nl '\n' -#define yes cout<<"YES"<>n; - double net=0; - fr(n) - { - int x; - cin>>x; - net+=x; - } - cout<> TC; - while (TC--) solve(); +#include +using namespace std; + +#define ll long long +#define ul unsigned long long +#define pb push_back +#define ss second +#define ff first +#define fr(n) for(int i=0; i=0; i--) +#define nl '\n' +#define yes cout<<"YES"<>n; + double net=0; + fr(n) + { + int x; + cin>>x; + net+=x; + } + cout<> TC; + while (TC--) solve(); } \ No newline at end of file diff --git a/208A Dubstep/208A.cpp b/Codes/208A Dubstep/208A.cpp similarity index 100% rename from 208A Dubstep/208A.cpp rename to Codes/208A Dubstep/208A.cpp diff --git a/22A Second Order Statistics/22A.cpp b/Codes/22A Second Order Statistics/22A.cpp similarity index 100% rename from 22A Second Order Statistics/22A.cpp rename to Codes/22A Second Order Statistics/22A.cpp diff --git a/230B T-primes/230B.cpp b/Codes/230B T-primes/230B.cpp similarity index 100% rename from 230B T-primes/230B.cpp rename to Codes/230B T-primes/230B.cpp diff --git a/231A Team/231A.cpp b/Codes/231A Team/231A.cpp similarity index 100% rename from 231A Team/231A.cpp rename to Codes/231A Team/231A.cpp diff --git a/236A Boy Or Girl/236A.cpp b/Codes/236A Boy Or Girl/236A.cpp similarity index 100% rename from 236A Boy Or Girl/236A.cpp rename to Codes/236A Boy Or Girl/236A.cpp diff --git a/263A Beautiful Matrix/263A.cpp b/Codes/263A Beautiful Matrix/263A.cpp similarity index 100% rename from 263A Beautiful Matrix/263A.cpp rename to Codes/263A Beautiful Matrix/263A.cpp diff --git a/266A Stones on the Table/266A.cpp b/Codes/266A Stones on the Table/266A.cpp similarity index 100% rename from 266A Stones on the Table/266A.cpp rename to Codes/266A Stones on the Table/266A.cpp diff --git a/266B Queue at the School/266B.cpp b/Codes/266B Queue at the School/266B.cpp similarity index 100% rename from 266B Queue at the School/266B.cpp rename to Codes/266B Queue at the School/266B.cpp diff --git a/268A Games/268A.cpp b/Codes/268A Games/268A.cpp similarity index 96% rename from 268A Games/268A.cpp rename to Codes/268A Games/268A.cpp index 5621243..ca93526 100644 --- a/268A Games/268A.cpp +++ b/Codes/268A Games/268A.cpp @@ -1,63 +1,63 @@ -#include -using namespace std; - -#define ll long long -#define ul unsigned long long -#define pb push_back -#define ss second -#define ff first -#define fr(n) for(int i=0; i=0; i--) -#define nl '\n' -#define yes cout<<"YES"<>n; - vectorhome(n); - vectoraway(n); - fr(n) - { - cin>>home[i]; - cin>>away[i]; - } - int ct=0; - fr(n) - { - frj(n) - { - if(home[i]==away[j]) - ct++; - } - } - cout<> TC; - while (TC--) solve(); +#include +using namespace std; + +#define ll long long +#define ul unsigned long long +#define pb push_back +#define ss second +#define ff first +#define fr(n) for(int i=0; i=0; i--) +#define nl '\n' +#define yes cout<<"YES"<>n; + vectorhome(n); + vectoraway(n); + fr(n) + { + cin>>home[i]; + cin>>away[i]; + } + int ct=0; + fr(n) + { + frj(n) + { + if(home[i]==away[j]) + ct++; + } + } + cout<> TC; + while (TC--) solve(); } \ No newline at end of file diff --git a/271A Beautiful Year/271A.cpp b/Codes/271A Beautiful Year/271A.cpp similarity index 100% rename from 271A Beautiful Year/271A.cpp rename to Codes/271A Beautiful Year/271A.cpp diff --git a/281A Word Capitalization/281A.cpp b/Codes/281A Word Capitalization/281A.cpp similarity index 100% rename from 281A Word Capitalization/281A.cpp rename to Codes/281A Word Capitalization/281A.cpp diff --git a/282A Bit++/282A.cpp b/Codes/282A Bit++/282A.cpp similarity index 100% rename from 282A Bit++/282A.cpp rename to Codes/282A Bit++/282A.cpp diff --git a/313A Ilya and Bank Account/313A.cpp b/Codes/313A Ilya and Bank Account/313A.cpp similarity index 100% rename from 313A Ilya and Bank Account/313A.cpp rename to Codes/313A Ilya and Bank Account/313A.cpp diff --git a/318A Even Odds/318A.cpp b/Codes/318A Even Odds/318A.cpp similarity index 96% rename from 318A Even Odds/318A.cpp rename to Codes/318A Even Odds/318A.cpp index de474f0..3558370 100644 --- a/318A Even Odds/318A.cpp +++ b/Codes/318A Even Odds/318A.cpp @@ -1,60 +1,60 @@ -#include -using namespace std; - -#define ll long long -#define ul unsigned long long -#define pb push_back -#define ss second -#define ff first -#define fr(n) for(int i=0; i=0; i--) -#define nl '\n' -#define yes cout<<"YES"<>n>>k; - if(k<=n/2) - cout<<2*k-1<> TC; - while (TC--) solve(); +#include +using namespace std; + +#define ll long long +#define ul unsigned long long +#define pb push_back +#define ss second +#define ff first +#define fr(n) for(int i=0; i=0; i--) +#define nl '\n' +#define yes cout<<"YES"<>n>>k; + if(k<=n/2) + cout<<2*k-1<> TC; + while (TC--) solve(); } \ No newline at end of file diff --git a/339A Helpful Maths/339A.cpp b/Codes/339A Helpful Maths/339A.cpp similarity index 100% rename from 339A Helpful Maths/339A.cpp rename to Codes/339A Helpful Maths/339A.cpp diff --git a/344A Magnets/344A.cpp b/Codes/344A Magnets/344A.cpp similarity index 100% rename from 344A Magnets/344A.cpp rename to Codes/344A Magnets/344A.cpp diff --git a/349A Cinema Line/349A.cpp b/Codes/349A Cinema Line/349A.cpp similarity index 100% rename from 349A Cinema Line/349A.cpp rename to Codes/349A Cinema Line/349A.cpp diff --git a/34A Reconnaissance 2/34A.cpp b/Codes/34A Reconnaissance 2/34A.cpp similarity index 100% rename from 34A Reconnaissance 2/34A.cpp rename to Codes/34A Reconnaissance 2/34A.cpp diff --git a/34B Sale/34B.cpp b/Codes/34B Sale/34B.cpp similarity index 100% rename from 34B Sale/34B.cpp rename to Codes/34B Sale/34B.cpp diff --git a/411A Password Check/411A.cpp b/Codes/411A Password Check/411A.cpp similarity index 100% rename from 411A Password Check/411A.cpp rename to Codes/411A Password Check/411A.cpp diff --git a/41A Translation/41A.cpp b/Codes/41A Translation/41A.cpp similarity index 100% rename from 41A Translation/41A.cpp rename to Codes/41A Translation/41A.cpp diff --git a/421A Pasha and Hamsters/421A.cpp b/Codes/421A Pasha and Hamsters/421A.cpp similarity index 100% rename from 421A Pasha and Hamsters/421A.cpp rename to Codes/421A Pasha and Hamsters/421A.cpp diff --git a/456B Fedya and Maths/456B.cpp b/Codes/456B Fedya and Maths/456B.cpp similarity index 100% rename from 456B Fedya and Maths/456B.cpp rename to Codes/456B Fedya and Maths/456B.cpp diff --git a/45A Codecraft III/45A.cpp b/Codes/45A Codecraft III/45A.cpp similarity index 97% rename from 45A Codecraft III/45A.cpp rename to Codes/45A Codecraft III/45A.cpp index 2b437b9..a8b5938 100644 --- a/45A Codecraft III/45A.cpp +++ b/Codes/45A Codecraft III/45A.cpp @@ -1,51 +1,51 @@ -#include -using namespace std; - -#define ll long long -#define ul unsigned long long -#define pb push_back -#define ss second -#define ff first -#define fr(n) for(int i=0; i=0; i--) -#define nl '\n' -#define yes cout<<"YES"<months={"January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"}; - string s; - int n; - cin>>s>>n; - auto it=find(all(months),s); - int index=(n+it-months.begin())%12; - cout<> TC; - while (TC--) solve(); +#include +using namespace std; + +#define ll long long +#define ul unsigned long long +#define pb push_back +#define ss second +#define ff first +#define fr(n) for(int i=0; i=0; i--) +#define nl '\n' +#define yes cout<<"YES"<months={"January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"}; + string s; + int n; + cin>>s>>n; + auto it=find(all(months),s); + int index=(n+it-months.begin())%12; + cout<> TC; + while (TC--) solve(); } \ No newline at end of file diff --git a/460 Plural Form of Nouns/99999460.cpp b/Codes/460 Plural Form of Nouns/99999460.cpp similarity index 100% rename from 460 Plural Form of Nouns/99999460.cpp rename to Codes/460 Plural Form of Nouns/99999460.cpp diff --git a/486A Calculating Function/486A.cpp b/Codes/486A Calculating Function/486A.cpp similarity index 100% rename from 486A Calculating Function/486A.cpp rename to Codes/486A Calculating Function/486A.cpp diff --git a/492A Vanya and Cubes/492A.cpp b/Codes/492A Vanya and Cubes/492A.cpp similarity index 100% rename from 492A Vanya and Cubes/492A.cpp rename to Codes/492A Vanya and Cubes/492A.cpp diff --git a/492B Vanya and Lanterns/492B.cpp b/Codes/492B Vanya and Lanterns/492B.cpp similarity index 100% rename from 492B Vanya and Lanterns/492B.cpp rename to Codes/492B Vanya and Lanterns/492B.cpp diff --git a/50A DominoPiling/50A.cpp b/Codes/50A DominoPiling/50A.cpp similarity index 100% rename from 50A DominoPiling/50A.cpp rename to Codes/50A DominoPiling/50A.cpp diff --git a/510A Fox And Snake/510A.cpp b/Codes/510A Fox And Snake/510A.cpp similarity index 96% rename from 510A Fox And Snake/510A.cpp rename to Codes/510A Fox And Snake/510A.cpp index d5e0736..f0e7ea9 100644 --- a/510A Fox And Snake/510A.cpp +++ b/Codes/510A Fox And Snake/510A.cpp @@ -1,73 +1,73 @@ -#include -using namespace std; - -#define ll long long -#define ul unsigned long long -#define pb push_back -#define ss second -#define ff first -#define fr(n) for(int i=0; i=0; i--) -#define nl '\n' -#define yes cout<<"YES"<>n>>m; - bool right=1,left=1; - fr(n) - { - if(!(i&1)) - { - fr(m) - cout<<"#"; - cout<> TC; - while (TC--) solve(); +#include +using namespace std; + +#define ll long long +#define ul unsigned long long +#define pb push_back +#define ss second +#define ff first +#define fr(n) for(int i=0; i=0; i--) +#define nl '\n' +#define yes cout<<"YES"<>n>>m; + bool right=1,left=1; + fr(n) + { + if(!(i&1)) + { + fr(m) + cout<<"#"; + cout<> TC; + while (TC--) solve(); } \ No newline at end of file diff --git a/525A Vitaliy and Pie/525A.cpp b/Codes/525A Vitaliy and Pie/525A.cpp similarity index 100% rename from 525A Vitaliy and Pie/525A.cpp rename to Codes/525A Vitaliy and Pie/525A.cpp diff --git a/546A Soldier and Bananas/546A.cpp b/Codes/546A Soldier and Bananas/546A.cpp similarity index 100% rename from 546A Soldier and Bananas/546A.cpp rename to Codes/546A Soldier and Bananas/546A.cpp diff --git a/584A Olesya and Rodion/584A.cpp b/Codes/584A Olesya and Rodion/584A.cpp similarity index 100% rename from 584A Olesya and Rodion/584A.cpp rename to Codes/584A Olesya and Rodion/584A.cpp diff --git a/599A Patrick and Shopping/599A.cpp b/Codes/599A Patrick and Shopping/599A.cpp similarity index 100% rename from 599A Patrick and Shopping/599A.cpp rename to Codes/599A Patrick and Shopping/599A.cpp diff --git a/59A Word/59A.cpp b/Codes/59A Word/59A.cpp similarity index 100% rename from 59A Word/59A.cpp rename to Codes/59A Word/59A.cpp diff --git a/617A Elephant/617A.cpp b/Codes/617A Elephant/617A.cpp similarity index 100% rename from 617A Elephant/617A.cpp rename to Codes/617A Elephant/617A.cpp diff --git a/630A Again Twenty Five!/630A.cpp b/Codes/630A Again Twenty Five!/630A.cpp similarity index 100% rename from 630A Again Twenty Five!/630A.cpp rename to Codes/630A Again Twenty Five!/630A.cpp diff --git a/677A Vanya and Fence/677A.cpp b/Codes/677A Vanya and Fence/677A.cpp similarity index 100% rename from 677A Vanya and Fence/677A.cpp rename to Codes/677A Vanya and Fence/677A.cpp diff --git a/705A Hulk/705A.cpp b/Codes/705A Hulk/705A.cpp similarity index 100% rename from 705A Hulk/705A.cpp rename to Codes/705A Hulk/705A.cpp diff --git a/706B Interesting drink/706B.cpp b/Codes/706B Interesting drink/706B.cpp similarity index 100% rename from 706B Interesting drink/706B.cpp rename to Codes/706B Interesting drink/706B.cpp diff --git a/71A Way Too Long Words/71A.cpp b/Codes/71A Way Too Long Words/71A.cpp similarity index 100% rename from 71A Way Too Long Words/71A.cpp rename to Codes/71A Way Too Long Words/71A.cpp diff --git a/734A Anton and Danik/734A.cpp b/Codes/734A Anton and Danik/734A.cpp similarity index 100% rename from 734A Anton and Danik/734A.cpp rename to Codes/734A Anton and Danik/734A.cpp diff --git a/742A Arpa’s hard exam and Mehrdad’s naive cheat/742A.cpp b/Codes/742A Arpa’s hard exam and Mehrdad’s naive cheat/742A.cpp similarity index 100% rename from 742A Arpa’s hard exam and Mehrdad’s naive cheat/742A.cpp rename to Codes/742A Arpa’s hard exam and Mehrdad’s naive cheat/742A.cpp diff --git a/74A Room Leader/74A.cpp b/Codes/74A Room Leader/74A.cpp similarity index 100% rename from 74A Room Leader/74A.cpp rename to Codes/74A Room Leader/74A.cpp diff --git a/791A Bear And Big Brother/791A.cpp b/Codes/791A Bear And Big Brother/791A.cpp similarity index 100% rename from 791A Bear And Big Brother/791A.cpp rename to Codes/791A Bear And Big Brother/791A.cpp diff --git a/854A Fraction/854A.cpp b/Codes/854A Fraction/854A.cpp similarity index 100% rename from 854A Fraction/854A.cpp rename to Codes/854A Fraction/854A.cpp diff --git a/855A Tom Riddle's Diary/855A.cpp b/Codes/855A Tom Riddle's Diary/855A.cpp similarity index 96% rename from 855A Tom Riddle's Diary/855A.cpp rename to Codes/855A Tom Riddle's Diary/855A.cpp index a3eda9b..0de8c29 100644 --- a/855A Tom Riddle's Diary/855A.cpp +++ b/Codes/855A Tom Riddle's Diary/855A.cpp @@ -1,59 +1,59 @@ -#include -using namespace std; - -#define ll long long -#define ul unsigned long long -#define pb push_back -#define ss second -#define ff first -#define fr(n) for(int i=0; i=0; i--) -#define nl '\n' -#define yes cout<<"YES"<>n; - setnames; - fr(n) - { - string s; - cin>>s; - if(names.find(s)==names.end()) - { - no; - names.insert(s); - } - else - yes; - } -} - -int main() -{ - fast_io; - int TC = 1; - //cin >> TC; - while (TC--) solve(); +#include +using namespace std; + +#define ll long long +#define ul unsigned long long +#define pb push_back +#define ss second +#define ff first +#define fr(n) for(int i=0; i=0; i--) +#define nl '\n' +#define yes cout<<"YES"<>n; + setnames; + fr(n) + { + string s; + cin>>s; + if(names.find(s)==names.end()) + { + no; + names.insert(s); + } + else + yes; + } +} + +int main() +{ + fast_io; + int TC = 1; + //cin >> TC; + while (TC--) solve(); } \ No newline at end of file diff --git a/977A Wrong Substraction/977A.cpp b/Codes/977A Wrong Substraction/977A.cpp similarity index 100% rename from 977A Wrong Substraction/977A.cpp rename to Codes/977A Wrong Substraction/977A.cpp diff --git a/9A Die Roll/9A.cpp b/Codes/9A Die Roll/9A.cpp similarity index 96% rename from 9A Die Roll/9A.cpp rename to Codes/9A Die Roll/9A.cpp index 5bcfa29..8140c9e 100644 --- a/9A Die Roll/9A.cpp +++ b/Codes/9A Die Roll/9A.cpp @@ -1,58 +1,58 @@ -#include -using namespace std; - -#define ll long long -#define ul unsigned long long -#define pb push_back -#define ss second -#define ff first -#define fr(n) for(int i=0; i=0; i--) -#define nl '\n' -#define yes cout<<"YES"<>x>>y; - int mx=max(x,y); - if(mx==1) - cout<<"1/1"<> TC; - while (TC--) solve(); +#include +using namespace std; + +#define ll long long +#define ul unsigned long long +#define pb push_back +#define ss second +#define ff first +#define fr(n) for(int i=0; i=0; i--) +#define nl '\n' +#define yes cout<<"YES"<>x>>y; + int mx=max(x,y); + if(mx==1) + cout<<"1/1"<> TC; + while (TC--) solve(); } \ No newline at end of file diff --git a/Readme.md b/Readme.md index b0c9312..b3c020d 100644 --- a/Readme.md +++ b/Readme.md @@ -130,7 +130,7 @@ Feel free to check these codes out. | 1833A | Musical Puzzle |[Question](https://codeforces.com/contest/1833/problem/A) | [Solution](https://github.com/ShazidMashrafi/Codeforces-Solutions/tree/master/1833A%20Musical%20Puzzle) |1833B | Restore the Weather | [Question](https://codeforces.com/contest/1833/problem/B) | [Solution](https://github.com/ShazidMashrafi/Codeforces-Solutions/tree/master/1833B%20Restore%20the%20Weather) | 1833C | Vlad Building Beautiful Array | [Question](https://codeforces.com/contest/1833/problem/C) | [Solution](https://github.com/ShazidMashrafi/Codeforces-Solutions/blob/master/1833C%20Vlad%20Building%20Beautiful%20Array/1833C.cpp) -| 1837A | Grasshopper on a Line | [Question](https://codeforces.com/problemset/problem/1837/A) | [Solution]() +| 1837A | Grasshopper on a Line | [Question](https://codeforces.com/problemset/problem/1837/A) | [Solution](https://github.com/ShazidMashrafi/Codeforces-Solutions/tree/master/1837A%20Grasshopper%20on%20a%20Line) | 1837B | Comparison String | [Question](https://codeforces.com/problemset/problem/1837/B) | [Solution](https://github.com/ShazidMashrafi/Codeforces-Solutions/blob/master/1837B%20Comparison%20String/1837B.cpp) | 1841B | Keep it Beautiful | [Question](https://codeforces.com/problemset/problem/1841/B) | [Solution](https://github.com/ShazidMashrafi/Codeforces-Solutions/blob/master/1841B%20Keep%20it%20Beautiful/1841B.cpp) | 1843A | Sasha and Array Coloring | [Question](https://codeforces.com/contest/1843/problem/A) | [Solution](https://github.com/ShazidMashrafi/Codeforces-Solutions/blob/master/1843A%20Sasha%20and%20Array%20Coloring/1843A.cpp)