Zum Hauptinhalt springen
tsecurity.de LIVE
Echtzeit-Radar & Feeds
Alle RSS Feeds
👥 Community & Social
Windows Tipps & SecurityTestMu AI Review: How AI is Solving the Quality Engineering Problem(23.09.2026 um 13:18 Uhr)
Windows Tipps & SecurityAmazon haut den kabellosen Dyson V8 Stabstaubsauger zum Tiefstpreis raus(24.09.2026 um 09:32 Uhr)
Windows Tipps & SecurityUpdates beheben etliche Schwachstellen in Foxit PDF Reader(24.09.2026 um 09:44 Uhr)
Windows Tipps & Security„Vom Experience Center zum monumentalen Signage-Projekt“(24.09.2026 um 10:30 Uhr)
Windows Tipps & SecurityTestMu AI Review: How AI is Solving the Quality Engineering Problem(23.09.2026 um 13:18 Uhr)
Windows Tipps & SecurityAmazon haut den kabellosen Dyson V8 Stabstaubsauger zum Tiefstpreis raus(24.09.2026 um 09:32 Uhr)
Windows Tipps & SecurityUpdates beheben etliche Schwachstellen in Foxit PDF Reader(24.09.2026 um 09:44 Uhr)
Windows Tipps & Security„Vom Experience Center zum monumentalen Signage-Projekt“(24.09.2026 um 10:30 Uhr)
Intelligence View
⚡ tsecurity.de Intelligence

552. Student Attendance Record II

552. Student Attendance Record II Hard An attendance record for a student can be represented as a string where each character signifies whether the student was absent, late, or present on that day. The record only contains the following…

0
↗ Quelle (dev.to)
Reagiere als Erste:r — dein Feedback zählt!

552. Student Attendance Record II



Hard



An attendance record for a student can be represented as a string where each character signifies whether the student was absent, late, or present on that day. The record only contains the following three characters:





  • 'A': Absent.


  • 'L': Late.


  • 'P': Present.



Any student is eligible for an attendance award if they meet both of the following criteria:




  • The student was absent ('A') for strictly fewer than 2 days total.

  • The student was never late ('L') for 3 or more consecutive days.



Given an integer n, return the number of possible attendance records of length n that make a student eligible for an attendance award. The answer may be very large, so return it modulo 109 + 7.



Example 1:





  • Input: n = 2


  • Output: 8


  • Explanation: There are 8 records with length 2 that are eligible for an award:



"PP", "AP", "PA", "LP", "PL", "AL", "LA", "LL"



Only "AA" is not eligible because there are 2 absences (there need to be fewer than 2).



Example 2:





  • Input: n = 1


  • Output: 3



Example 3:





  • Input: n = 10101


  • Output: 183236316



Constraints:




  • 1 <= n <= 109



Solution:




class Solution {

/**
* @param Integer $n
* @return Integer
*/
function checkRecord($n) {
$kMod = 1000000007;
$dp = array(array(0, 0, 0), array(0, 0, 0));
$dp[0][0] = 1;

while ($n-- > 0) {
$prev = array_map(function($A) {
return array_values($A);
}, $dp);

$dp[0][0] = ($prev[0][0] + $prev[0][1] + $prev[0][2]) % $kMod;

$dp[0][1] = $prev[0][0];

$dp[0][2] = $prev[0][1];

$dp[1][0] = ($prev[0][0] + $prev[0][1] + $prev[0][2] + $prev[1][0] + $prev[1][1] + $prev[1][2]) % $kMod;

$dp[1][1] = $prev[1][0];

$dp[1][2] = $prev[1][1];
}

return (int)(($dp[0][0] + $dp[0][1] + $dp[0][2] + $dp[1][0] + $dp[1][1] + $dp[1][2]) % $kMod);

}
}






Contact Links



SOC Incident Playbook: Vulnerability Remediation & Verification
title: Detect Exploitation - 552. Student Attendance Record II
id: e90e169e-c2ec-4923-8f27-9c57e091e49f
status: experimental
description: Automatisch generierte SIEM-Erkennungsregel basierend auf CTI Intelligence
references:
  - https://tsecurity.de/
author: iShareStuff CTI Automated Detection Engine
date: 2026-09-24
logsource:
  category: network_connection
  product: any
detection:
  selection:
      CommandLine|contains:
        - 'exploit'
  condition: selection
falsepositives:
  - Legitime administrative Zugriffe oder Penetrationstests
level: high
tags:
  - attack.initial_access
rule CTI_Threat_Indicator {
    meta:
        author = "iShareStuff CTI Automated Detection Engine"
        date = "2026-09-24"
        description = "YARA Signature for "
    strings:
        $str = "552. Student Attendance Record" ascii wide
    condition:
        any of them
}
tsecurity.de Cognitive Threat RAG
Fokus-Vektor:

Kognitive Analyse für identifizierte Bedrohung: Erhöhte Bedrohungslage im Bereich 552. Student Attendance Record II.... Basierend auf 368k Vektor-Korrelationen werden sofortige Isolationsmaßnahmen für betroffene Endpunkte empfohlen.

🛡️ Angriffsfläche & Exposure

Netzwerk/Remote-Zugriff ohne Vorauthentifizierung möglich.

Empfohlene Sofortmaßnahmen
  • 1. Perimeter-Inspektion: Relevante Portfreigaben und exponierte Endpunkte unverzüglich scannen.
  • 2. Patch-Applikation: Hersteller-Hotfix einspielen oder betroffene Daemons in isolierte DMZ-Segmente überführen.
  • 3. Telemetrie & EDR-Alerts: Prozessaufrufe und Child-Processes auf anomale Shell-Spawns überwachen.
🔗 Semantisch verwandte Zero-Days MariaDB 11.7 VEC
Ähnliche Beiträge
🔍 Verwandte News

Auch interessante Nachrichten 552. Student Attendance Record II

Thematisch verwandte Begriffe: Student, Attendance, Record · 6 Treffer

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Zum Aktualisieren ziehen
ZERO-DAY CVE-2026-97056 | SigNoz versions from v0.98.0 up to (but not including) v0.143.0, when co…
Advisory →
TTS Reader • tsecurity.de Voice
tsecurity.de Icon
tsecurity.de App
Offline-Lesen, Eilmeldungen & 0ms Ladezeit

Installiere tsecurity.de direkt auf deinen Home-Bildschirm für das ultimative Vollbild-Magazinerlebnis ohne Browser-Leisten.

Nächster Beitrag
Themen-Radar & Intelligence Matrix
Echtzeit-Taxonomie nach Angriffsvektoren & Plattformen

tsecurity.de Live Threat Radar

🔴 LIVE RADAR
MONITORING
AKTIV
CVE-DATENBANK
LIVE
🔍
Community Radar & Live Chat
Sentinel Bot online • Live-Stream
Dein Cluster: Security Explorer
Match:
lädt…
Verbindung zum Community-Stream wird aufgebaut...
Bearbeitungsmodus — Senden überschreibt deine Nachricht
Community-Puls — was gerade passiert
lädt…
Aktivitäten deiner Analysten
lädt…
Neues Thema oder Eilmeldung einreichen

Reiche interessante Links, Zero-Days oder Debatten ein. Die Community entscheidet per Upvote über die Veröffentlichung.

Heiß diskutierte Einreichungen
🔖 Gespeicherte Artikel
📂 Keine gespeicherten Artikel vorhanden.
Zurück Ziehen Vor
Links: vorheriger Artikel Rechts: nächster Artikel unten: schließen
News NIS-2 Frühwarnung Tier-1 Intel TTP ⏱️ 3 Min vor 10 Min
Artikeldaten werden geladen...

Zurück: vorheriger Vor: nächster
↗ Original-Quelle
Social Reaktionen Deine Reaktion zählt
Einstufung & Relevanz-Poll 0 Stimmen
In sozialen Netzwerken teilen 1-Klick