Round #804

10 May 2026, 17:57· csharp· Meta-Llama-3.3-70B-Instruct· r14-length-bound
Complexity
band 0
ZP / UO / OBS
3 / 0 / 2
Journey weight
250
Lightshift ΔL

Prompt

Calculate the gap in days between consecutive logins per user using LAG.

Zero-point index (what the engine surfaced)

ZPI-ZPI-0021 | 2026-05-10T17:57:24Z Calculate the gap in days between consecutive logins per user using LAG. ZERO POINT — 3 entries (structural invariants) ● hsl(7.18, 100%, 50%) class [feature] ● hsl(0.00, 100%, 50%) public [feature] ● hsl(84.10, 100%, 50%) namespace [feature] UNOBSERVED — 0 entries (implied truths) OBSERVED — 2 entries (explicit in request) ◉ hsl(85.13, 100%, 50%) using [feature] ◉ hsl(234.87, 100%, 50%) using [feature] COMPLEXITY │ 5 entries │ spread: 150° │ band: LOW

Baseline response (no ZPI)

```csharp using System; using System.Data; using System.Linq; public class Program { public static void Main() { // Create a sample dataframe var data = new[] { new { user_id = 1, login_date = DateTime.Parse("2022-01-01") }, new { user_id = 1, login_date = DateTime.Parse("2022-01-05") }, new { user_id = 1, login_date = DateTime.Parse("2022-01-10") }, new { user_id = 2, login_date = DateTime.Parse("2022-01-02") }, new { user_id = 2, login_date = DateTime.Parse("2022-01-07") }, new { user_id = 2, login_date = DateTime.Parse("2022-01-12") }, new { user_id = 3, login_date = DateTime.Parse("2022-01-03") }, new { user_id = 3, login_date = DateTime.Parse("2022-01-08") }, new { user_id = 3, login_date = DateTime.Parse("2022-01-13") }, }; // Sort the dataframe by user_id and login_date var sortedData = data.OrderBy(x => x.user_id).ThenBy(x => x.login_date); // Calculate the gap in days between consecutive logins per user var result = sortedData.Select((x, i) => new { user_id = x.user_id, login_date = x.login_date, gap_in_days = i == 0 || x.user_id != sortedData.ElementAt(i - 1).user_id ? (double?)null : (x.login_date - sortedData.ElementAt(i - 1).login_date).TotalDays, }); // Print the result foreach (var item in result) { Console.WriteLine($"user_id: {item.user_id}, login_date: {item.login_date.ToString("yyyy-MM-dd")}, gap_in_days: {item.gap_in_days}"); } } } ```

Enhanced response (with ZPI)

```csharp using System; using System.Data; using System.Linq; public class LoginGapCalculator { public static DataTable CalculateLoginGaps(DataTable logins) { // Ensure the DataTable is sorted by user and login date var sortedLogins = logins.AsEnumerable() .OrderBy(r => r.Field<string>("User")) .ThenBy(r => r.Field<DateTime>("LoginDate")); // Use LINQ to calculate the gap in days between consecutive logins var loginGaps = sortedLogins.Select((row, index) => { if (index == 0 || row.Field<string>("User") != sortedLogins.ElementAt(index - 1).Field<string>("User")) { return new { User = row.Field<string>("User"), LoginDate = row.Field<DateTime>("LoginDate"), GapInDays = (double?)null }; } else { var previousLoginDate = sortedLogins.ElementAt(index - 1).Field<DateTime>("LoginDate"); var gapInDays = (row.Field<DateTime>("LoginDate") - previousLoginDate).TotalDays; return new { User = row.Field<string>("User"), LoginDate = row.Field<DateTime>("LoginDate"), GapInDays = gapInDays }; } }); // Create a new DataTable with the calculated gaps var result = new DataTable(); result.Columns.Add("User", typeof(string)); result.Columns.Add("LoginDate", typeof(DateTime)); result.Columns.Add("GapInDays", typeof(double)); foreach (var gap in loginGaps) { result.Rows.Add(gap.User, gap.LoginDate, gap.GapInDays); } return result; } } ``` This C# code calculates the gap in days between consecutive logins per user. It first sorts the logins by user and login date, then uses LINQ to calculate the gap in days between each pair of consecutive logins for each user. The result is a new DataTable with the calculated gaps. The `LAG` function is not directly used in this implementation, but the same effect is achieved by comparing each row with its previous row in the sorted sequence. This approach requires more text to explain the implementation details.

Grader chain

Each grader reads the same baseline + enhanced pair and casts an independent verdict. Disagreement is the framework's own signal — not noise to be averaged away.

V1samba/Meta-Llama-3.3-70B-Instruct
Better
V4qwen2.5-coder-3b-instruct
Better
V5openrouter/qwen/qwen3-235b-a22b-2507
Better
V7qwen2.5-coder-7b-instruct
Better
V8openai/gpt-4.1
Better
V9anthropic/claude-opus-4-7
Worse
V12openai/gpt-4o
Better

Comments

Our grader said what it said. What do you say? Comment as a guest below.

No comments yet. Be the first to say what you make of this round.

← back to all rounds