Comments (6)
Hi!
I can't score 100 in this problem too. quera gives me a score of 71 either.
I tried to solve the problem this time with Python:
def is_good_code (unique_chars : list, code : str) -> bool:
for c in code:
if c not in unique_chars:
return False
return True
def main () -> None:
n, discount_code = input().split()
codes = []
for i in range (int (n)):
codes.append (input())
unique_chars = list(set(discount_code))
for code in codes:
if is_good_code(unique_chars, code):
print ("Yes")
else:
print ("No")
if __name__ == "__main__":
main ()
from queraproblems.
I tried to solve the problem with c++ too. but it keep giving me 71:
#include <iostream>
using namespace std;
int main(){
int n;
string t;
cin >> n >> t;
string l[n] = {};
for(int i = 0; i < n; i++){
string x;
cin >> x;
bool f = 1;
for(int j = 0; j < x.size(); j++){
bool f2 = 0;
for(int k = 0; k < t.size(); k++){
if (x[j] == t[k]){
f2 = 1;
}
}
if (!f2){
f = 0;
}
}
if (f){
l[i] = "Yes";
}
else{
l[i] = "No";
}
}
for(int i = 0; i < n; i++){
cout << l[i] << endl;
}
}
from queraproblems.
Hi!
I was finally able to solve the question with the help of one of my friends and I realized that we completely misunderstood the question.
We thought that each letter must be in a special set of letters. But each discount code only changes the order of special letters.
from queraproblems.
thank you.
I will check soon and add your name to the list of contributors.
from queraproblems.
from queraproblems.
I added this part to thank you again.
from queraproblems.
Related Issues (20)
- Bug: Exit Code
- Template for web projects
- Version and Changelog
- OpenProblem: 108669 - سوباسا و دوستان
- Save Quera Problems
- Add Persian Readme file
- Display contributors for each problem in the readme table
- Move to public repository?
- Use Microsoft CommandLine
- Use DependencyInjection & Logger
- Improve get last commit date
- Use sqlite for cache data
- Add unit test
- Ignore extra folders
- Show number of commits
- dev: Path of the solution description file (readme)
- dev: Move solutions to master branch
- Add readme for Templates
- Bug: Last commit in readme file HOT 1
- Refactor ReadmeGenerator program
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from queraproblems.