diff --git a/2017/AUG.md b/2017/AUG.md index d2640c7..944b26d 100644 --- a/2017/AUG.md +++ b/2017/AUG.md @@ -14,7 +14,7 @@ | [AUG17](https://www.codechef.com/AUG17) | [GCAC](https://www.codechef.com/AUG17/problems/GCAC) | ★★★ | | [![image](../img/GH.png)](AUG/AUG17/GCAC/GCAC.cpp) [![image](../img/CC.png)](https://www.codechef.com/viewsolution/14947059) (100 pts) [![image](../img/AC.png)](#) | | | | [AUG17](https://www.codechef.com/AUG17) | [PALINGAM](https://www.codechef.com/AUG17/problems/PALINGAM) | ★★★ | | [![image](../img/GH.png)](AUG/AUG17/PALINGAM/PALINGAM.cpp) [![image](../img/CC.png)](https://www.codechef.com/viewsolution/14908284) (100 pts) [![image](../img/AC.png)](#) | | | | [AUG17](https://www.codechef.com/AUG17) | [CHEFFA](https://www.codechef.com/AUG17/problems/CHEFFA) | ★★★★ | | | | | -| [AUG17](https://www.codechef.com/AUG17) | [STRINGRA](https://www.codechef.com/AUG17/problems/STRINGRA) | ★★★★ | | | | | +| [AUG17](https://www.codechef.com/AUG17) | [STRINGRA](https://www.codechef.com/AUG17/problems/STRINGRA) | ★★★★ | | [![image](../img/GH.png)](AUG/AUG17/STRINGRA/STRINGRA.cpp) [![image](../img/CC.png)](https://www.codechef.com/viewsolution/14982151) (100 pts) [![image](../img/AC.png)](#) | | | | [AUG17](https://www.codechef.com/AUG17) | [MATDW](https://www.codechef.com/AUG17/problems/MATDW) | ★★★★ | | | | | | [AUG17](https://www.codechef.com/AUG17) | [HILLJUMP](https://www.codechef.com/AUG17/problems/HILLJUMP) | ★★★★★ | | [![image](../img/GH.png)](AUG/AUG17/HILLJUMP/HILLJUMP.cpp) [![image](../img/CC.png)](https://www.codechef.com/viewsolution/14996982) (100 pts) [![image](../img/AC.png)](#) | | | | [AUG17](https://www.codechef.com/AUG17) | [WALKBT](https://www.codechef.com/AUG17/problems/WALKBT) | ★★★★★ | | | | | diff --git a/2017/AUG/AUG17/STRINGRA/stringra.cpp b/2017/AUG/AUG17/STRINGRA/stringra.cpp new file mode 100644 index 0000000..10eaa96 --- /dev/null +++ b/2017/AUG/AUG17/STRINGRA/stringra.cpp @@ -0,0 +1,94 @@ +#include + +using namespace std; + +int main(){ + int t; + cin>>t; + while(t--){ + int n,m; + + cin>>n>>m; + vector ad[n+1]; + while(m--){ + int a,b; + + cin>>a>>b; + + if(aedges||ad[i].size()==0){ + goto re; + } + + for(int j=0;ji){ + ++count; + } + } + if(count!=ad[i].size()){ + goto re; + } + } + for(int i=1;i<=n;i++){ + cout<