码农知识堂 - 1000bd
  •   Python
  •   PHP
  •   JS/TS
  •   JAVA
  •   C/C++
  •   C#
  •   GO
  •   Kotlin
  •   Swift
  • 签个到吧codeforces898


    1. #include
    2. #define int long long
    3. #define endl "\n"
    4. #define IOS std::ios::sync_with_stdio;cin.tie(0);cout.tie(0);
    5. using namespace std;
    6. int n;
    7. void solve(){
    8. cin >> n;
    9. while(n--){
    10. string s;
    11. cin >> s;
    12. int s1=s.find('a');
    13. int s2=s.find('b');
    14. int s3=s.find('c');
    15. if(s1==0||s2==1||s3==2){
    16. cout << "YES" << endl;
    17. }
    18. else cout << "NO" <
    19. }
    20. }
    21. signed main(){
    22. IOS;int _=1; //cin >> _;
    23. while(_--){
    24. solve();
    25. }
    26. return 0;
    27. }

    b。

    1. #include
    2. #define int long long
    3. #define endl "\n"
    4. #define IOS std::ios::sync_with_stdio;cin.tie(0);cout.tie(0);
    5. using namespace std;
    6. int n;
    7. void solve(){
    8. cin >> n;
    9. while(n--){
    10. int k; cin >> k;
    11. map<int ,int>mp;//防止重复
    12. int a[k],minn=10,sum=1;
    13. memset(a,0,sizeof(a));
    14. //memset(mp,0,sizeof(mp));
    15. for(int i=0;i
    16. cin >> a[i];
    17. if(a[i]
    18. minn=a[i];
    19. mp[i]=1;
    20. }
    21. }
    22. for(int i=0;i
    23. if(minn==a[i]&&mp[i]==1){
    24. a[i]+=1;
    25. }
    26. sum*=a[i];
    27. }
    28. cout << sum << endl ;
    29. }
    30. }
    31. signed main(){
    32. IOS;int _=1; //cin >> _;
    33. while(_--){
    34. solve();
    35. }
    36. return 0;
    37. }

    c

    1. #include
    2. using namespace std;
    3. #define ll long long
    4. #define sz(c) (int)c.size()
    5. #define all(c) c.begin(),c.end()
    6. #define f first
    7. #define s second
    8. void solve() {
    9. vector s(10);
    10. for (string& i : s)
    11. cin >> i;
    12. ll out = 0;
    13. for (ll i = 0; i < 10; i++)
    14. for (ll j = 0; j < 10; j++)
    15. if (s[i][j] == 'X')
    16. out += min({i+1,10-i,j+1,10-j});
    17. cout << out << "\n";
    18. }
    19. int main(void) {
    20. ios::sync_with_stdio(0);
    21. cin.tie(0);
    22. int t;
    23. cin >> t;
    24. for (int i = 1; i <= t; ++i)
    25. solve();
    26. }

  • 相关阅读:
    MyBatis拦截器优雅实现数据脱敏
    当当网按关键字搜索dangdang商品 API
    Django第三章(模版系统全局变量-if判断-for循环-过滤器-模版继承/引用-引用静态文件)
    SpringFramework:循环依赖与三级缓存
    Hexagon_V65_Programmers_Reference_Manual(23)
    [ESP32]:TFLite Micro推理CIFAR10模型
    面试金典--面试题 16.18. 模式匹配 (前缀和+哈希表)
    Lesson01: 网页脚本语言
    Linux 网络之ss
    Unity-WebGL基于JS实现网页录音
  • 原文地址:https://blog.csdn.net/m0_74014212/article/details/133172889
  • 最新文章
  • 攻防演习之三天拿下官网站群
    数据安全治理学习——前期安全规划和安全管理体系建设
    企业安全 | 企业内一次钓鱼演练准备过程
    内网渗透测试 | Kerberos协议及其部分攻击手法
    0day的产生 | 不懂代码的"代码审计"
    安装scrcpy-client模块av模块异常,环境问题解决方案
    leetcode hot100【LeetCode 279. 完全平方数】java实现
    OpenWrt下安装Mosquitto
    AnatoMask论文汇总
    【AI日记】24.11.01 LangChain、openai api和github copilot
  • 热门文章
  • 十款代码表白小特效 一个比一个浪漫 赶紧收藏起来吧!!!
    奉劝各位学弟学妹们,该打造你的技术影响力了!
    五年了,我在 CSDN 的两个一百万。
    Java俄罗斯方块,老程序员花了一个周末,连接中学年代!
    面试官都震惊,你这网络基础可以啊!
    你真的会用百度吗?我不信 — 那些不为人知的搜索引擎语法
    心情不好的时候,用 Python 画棵樱花树送给自己吧
    通宵一晚做出来的一款类似CS的第一人称射击游戏Demo!原来做游戏也不是很难,连憨憨学妹都学会了!
    13 万字 C 语言从入门到精通保姆级教程2021 年版
    10行代码集2000张美女图,Python爬虫120例,再上征途
Copyright © 2022 侵权请联系2656653265@qq.com    京ICP备2022015340号-1
正则表达式工具 cron表达式工具 密码生成工具

京公网安备 11010502049817号