首页 > TAG信息列表 > 551

20211109 Codeforces Round #551 (Div. 2) ABCD 题解

比赛链接 A. Serval and Bus By 刘鑫龙 B. Serval and Toy Bricks By 陈代睿 C. Serval and Parenthesis Sequence By 李昊坤 D. Serval and Rooted Tree By 王励翔 已更新 B 题

每日一题.551. 学生出勤记录 I

解题思路 简单模拟 代码 class Solution { public boolean checkRecord(String s) { char[] chars = s.toCharArray(); int lateNum = 0,absentNum = 0,n = s.length(); for (int i=0;i<n;i++){ if (lateNum>=3 || absentNum>=2){

LeetCode——551. 学生出勤记录 I(Java)

题目描述 题干: 给你一个字符串 s 表示一个学生的出勤记录,其中的每个字符用来标记当天的出勤情况(缺勤、迟到、到场)。 记录中只含下面三种字符: 'A':Absent,缺勤 'L':Late,迟到 'P':Present,到场 如果学生能够 同时 满足下面两个条件,则可以获得出勤奖励: 按 总出勤 计,学生缺勤('A')严格 少于

前端基础需要学什么?这篇文章帮你梳理清楚,另附有前端面试551道题

前言 之前小编写了一篇前端面试套餐:Vue面试题总结+JavaScript前端经典面试题+100道 CSS 面试题文章,有讲到打算后面单独写一篇详讲前端基础学什么,拖了这么久终于出来了哈哈哈哈。至于前端怎么学,小伙伴们可以看看这篇文章,有详细讲了3个学习方法,点击这直接跳转到文章。让我们一

551,回溯算法解分割回文串

I think a man does what he can until his destiny is revealed to him.  一个人应该竭尽所能,然后才听天由命。 问题描述 来源:LeetCode第131题 难度:中等   给你一个字符串s,请你将s分割成一些子串,使每个子串都是回文串。返回s所有可能的分割方案。   回文串是正着读和反着读都一

B. Serval and Toy Bricks---简单构造(贪心)-- Codeforces Round #551 (Div. 2)

Serval and Toy Bricks time limit per test 1 second memory limit per test 256 megabytes 题目链接http://codeforces.com/problemset/problem/1153/B emmm,题目有点冗长了,所以就直接看样例了和输入说明。然后就大概明白题意了。 题目大意:给你每列的最大值和每行的最大值,再给

Codeforces Round #551题解

A题 枚举记录 #include<bits/stdc++.h> using namespace std; typedef long long ll; typedef pair<int,int> pll; const int N=2e6+10; const int mod=1e9+7; const int inf=0x3f3f3f3f; int s[N],d[N]; int cnt[N]; int main(){ ios::sync_with_stdio(false);

CSE 551 Programming

CSE 551 Programming AssignmentOctober 21, 2020Submission Instructions: Deadline is 11:59pm on 11/03. Late submissions will be penalized, thereforeplease ensure that you submit (file upload is completed) before the deadline. Additionally, you can downloadt

python3 三角函数

示例: 点赞 1 收藏 分享 文章举报 学亮编程手记 发布了1231 篇原创文章 · 获赞 551 · 访问量 82万+ 他的留言板 关注

551-学生出勤记录 I

551-学生出勤记录 I 给定一个字符串来代表一个学生的出勤记录,这个记录仅包含以下三个字符: 'A' : Absent,缺勤 'L' : Late,迟到 'P' : Present,到场 如果一个学生的出勤记录中不超过一个'A'(缺勤)并且不超过两个连续的'L'(迟到),那么这个学生会被奖赏。 你需要根据这个学生的出勤记

正则表达

<?php$character = "15.(2015秋•姜堰市期中)出生于公元前551年的孔子,出生年份记作﹣551年;李白出生于公元701年,对于他的出生年份,下面的记法不正确的是 (%brackets%)"; $reg = '/%[A-Za-z_]{1,}%/';$character = preg_replace($reg, '__', $character);print_r($character); ?> 将%brackets

思维题--code forces round# 551 div.2

思维题--code forces round# 551 div.2 题目 D. Serval and Rooted Tree time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output Now Serval is a junior high school student in Japari Middle School, and he is stil

Codeforces Round #551 (Div. 2) 题解

CF1153A 直接做啊,分类讨论即可 #include<iostream> #include<string.h> #include<string> #include<stdio.h> #include<algorithm> #include<math.h> #include<vector> #include<queue> #include<map> #include<set> usin

C. Serval and Parenthesis Sequence 【括号匹配】 Codeforces Round #551 (Div. 2)

冲鸭,去刷题:http://codeforces.com/contest/1153/problem/C C. Serval and Parenthesis Sequence time limit per test1 second memory limit per test256 megabytes inputstandard input outputstandard output Serval soon said goodbye to Japari kindergarten, and beg

Codeforces Round #551 Div. 2

  A:签到。没仔细看数据范围,看到一个O(nt)的差点叉上去了。 #include<bits/stdc++.h>using namespace std;#define ll long long#define N 110char getc(){char c=getchar();while ((c<'A'||c>'Z')&&(c<'a'||c>'z')&&(c